hello,
when i setup physics world, and an object is inside with a gravity force
it falls and bounces until staying still.
how i can make it bounce all the time from one wall to another ?
which force i have to apply to it from walls ??
thank you
A fast, easy to use, free, and community supported 2D game engine
hello,
when i setup physics world, and an object is inside with a gravity force
it falls and bounces until staying still.
how i can make it bounce all the time from one wall to another ?
which force i have to apply to it from walls ??
thank you
Change the objects restitution, to 1.0f (you do this at creation time, i believe you do it on the fixture definition itself) which means it keeps 100% of it's velocity after it bounces on something.
However keep in mind that with gravity moving it, all the forces on it will keep adding up so it will end up going SUPER fast. Play around with that number though
You must log in to post.