I am currently facing a little problem for which you may have some tips.
I have two objects which have both a rigid body with a non null mass and a bounding box collision shape.
One object is moving toward the second one which is not moving.
When the collision occurs (it is correctly detected), the non moving object is thrown away by rotating on himself is all directions (its mass is much lower than the one of the moving object).
For now, everything seems to work fine.
What I want to achieve is to cancel all forces applied to the second object simply by pressing a key on my keyboard.
For that, in my keydown handler, I tried to call several functions like this:
with no effects. The second object is still moving and rotating after the collision.
I have also tried:
no more results…
I also tried to cancel operations applied on the object node like that:
nothing seems to be able to reset all forces/transform applied to either the body or the node.
It would be very helpful if you can provide me with some tips to get closer to the solution.
Thanks a lot!