- Home /
Rigidbody: Freeze All vs InKinematic
If you set a rigidbody to either kinematic or freeze all the position and rotation, it will be unaffected by physics. What are some other consequences freezing verses setting to kinematic?
I can think of one. A kinematic rigidbody will not send collision events, but a frozen one will.
This is the reason I am asking. I want to use the built-in collision detection, but I need to resolve the collision in non-realistic ways. So I want kinematic rigidbodies, but those don't send collision events, so I'm thinking of just freezing the position and rotation.
I'm wondering if there are some performance differences between the two.
Have you tried using OnTriggerEnter/OnTriggerExit/OnTriggerStay? Unlike OnCollision they can be used with kinematic rigidbodies.
http://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html
http://docs.unity3d.com/ScriptReference/Collider.OnTriggerExit.html
http://docs.unity3d.com/ScriptReference/Collider.OnTriggerStay.html
@Croolsby I am experiencing something different here when I freeze the rotation without freezing position the collision event does happen. but when I froze them all(position, rotation) it just doesn't accept any collisions.
@maccabbe the triggers won't work since it needs one of the object set as a trigger, but not both. and since I have the prefab and I am instantiating a copy of the prefab and detecting the collision. this won't work.