Physics Question: Hard Walls

0 favourites
  • 6 posts
From the Asset Store
Dynamic heavy and powerful hard rock tracks. 15 tracks, loops and more.
  • I have a box with 4 walls in the centre of the screen.

    Inside the box i have 10 marbles.

    I have applied physics to all marbles. The walls are set to unmoveable.

    I can move the marbles with the mouse as I enabled Drag & Drop on the marbles and they react great. however if i apply a large impulse or move the mouse a lot, the marbles PASS THROUGH the walls.

    I wand to make the walls HARD and IMPENETRABLE. What physics attributes should I apply to the walls?

    Thanks a lot

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Try enabling the 'bullet' property in the physics behavior for the fast moving objects.

    Note from the Physics Basics tutorial most behaviors conflict with Physics, so if you are dragging and dropping objects through walls then there's not much that can be done about that - you'll have to move the objects towards the mouse using forces instead of the behavior.

  • i removed the drag and drop and i have seen no effect, so the drag & drop is not causing any problem.

    what was causing the problem is that one of the wall masks was moving out of place with an ill-placed sine behaviour!

    thanks for help

  • If you apply a huge impulse, there's not much you can do to prevent warping. It's a side-effect of the game loop running only 60 times/second.

  • I would make a new Event that turns off the Drag and Drop when the mouse touched the Walls ...you could even use an invisible helper sprite set to Mouse.x, Mouse.y position every tick....

    The Helper Sprite "Buffers" the effect .and could even be dynamically scaled depending on where your mouse was on the screen, by using areas which affect scale..etc...you know..a dynamic real time..scaling of effect...IN the Military its called Scalar technology...if it works on a small level you just scale it up!!

    What I mean is apply the Drag and drop disabling event to the invisible Sprite Helper..

    so that it turns off well before the marble gets beyond the Walls..

    So the Helper not the marble or the mouse triggers the Drag and drop disabling event..

    Does that make sense?

    Helpers are good for everything...

    This is what I mean

    http://s12.postimage.org/nx8zktxe5/This_is_what_I_mean.jpg

  • thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)