- Home /
How to disable transfer of force between two 2d rigidbody ?
I work on a 2D game and I use Rigidbody to move characters, but when a character collided whith another one, the force of the first one is tranfer to the second one. I want to disable this transfer of force, but I don't how.
I answered a similar question here: http://answers.unity3d.com/questions/1229445/how-do-i-stop-rigidbody2d-bounce.html#comment-1230711
If I understood correctly : I set is$$anonymous$$inematic property of all rigidbody on true, I move characters with Rigidbody2D.movePosition() and I create myself the collider test ?
Answer by mahdiii · Aug 29, 2016 at 08:24 PM
you must define different layers for objects. Then you can change physics in physics table setting and uncheck in the table. Edit > Project Settings > Physics
Correct me if I'm wrong, but I'm fairly sure you can only configure whether collisions happen or not between two layers; You cannot configure two layers to collide but ignore physics when they do. To ignore physics you must make the object a static collider or set the is$$anonymous$$inematic flag (which, of course, means you have to do your own checking; the collisions still happen, they just don't have a physics-based result).
The OP's question is about how to have collision checking, i.e. two objects that cannot pass through each other, but to ignore the physics calculations when they do collide i.e. classic 2D physics without bouncing and realistic forces upon collision.
Your answer