Why does collision gets affected when Rigidbody is added?

As what the title says, why is 2D collision affected when “Is Kinematic” in Rigidbody 2D enabled/disabled? Is this a bug? If it is then is this fix in the latest version? Because I’m experiencing it in Unity 5.3.3.

You’re changing the body-type between dynamic and kinematic and certain body-types only contact certain other body-types. Dynamic body-type contacts all other body-types whereas a Kinematic body-type only contacts Dynamic body-type. Changing this causes the contacts to be re-evaluated next physics update.

You really shouldn’t change the body-type unless you have good reason. You should only use a kinematic body when you intend to move it yourself and for no other reason. Anything else is just abusing what it’s for.

The main problem in Unity is that everything is exposed as properties on components so things are just ‘poked’ at with sometimes unexpected results. The state of a component can change when you change its properties and shouldn’t be unexpected.

If you look at the 2D experimental preview page and click on the Reference doc, you will find a section on the body-type where I explain what it means. That should help clarify it.

1 Like