Page 1 of 1

Object flying off the cliff

Posted: Sun Apr 29, 2018 5:23 pm
by R0Zen
Ok I'm to do find the solution for this for some time now.
I have a capsule (player object) that moves on lines (the level map).
I'm using the applyForce function to move the object on the X axis only (left and right).
the issue is when I'm on cliffs and hard edges on the map the objects is flying off it and not sliding down.


in green you can see what I'm trying to do and in blue is what happens.

there is a function that will make the player stay on line when it moves?

Re: Object flying off the cliff

Posted: Tue May 08, 2018 2:13 pm
by R0Zen

Re: Object flying off the cliff

Posted: Wed May 09, 2018 7:55 am
by zoom
Well, dyn4j is simulating pyshics and that's how physics work :-)

If you want to position things and ignore the physics in the physics engine you can find some approaches in this thread: