- Home /
Why attach a kinematic rigidbody to a collider that moves a lot?
According to the Colliders manual page http://unity3d.com/support/documentation/ScriptReference/Collider.html
"If you intend to move the collider around a lot it is recommended to also attach a kinematic rigidbody to it."
My question is what kind of movement is this referring to? Would this apply to just rotating and/or panning the collider object? What about just rotating or panning the camera that looks at the object?
And why would attaching a kinematic rigidbody to it help?
Answer by Justin Warner · Dec 30, 2010 at 01:57 AM
Kinematic Rigidbodies
Kinematic Rigidbodies are not affected by forces, gravity or collisions. They are driven explicitly by setting the position and rotation of the transform or animating them, yet they can interact with other non-Kinematic Rigidbodies.
Kinematic Rigidbodies are used for three purposes: Sometimes you want an object to be under physics control but in another situation to be controlled explicitly from a script or animation. For example you could make an animated character whose bones have Rigidbodies attached that are connected with joints for use as a Ragdoll. Most of the time the character is under animation control, thus you make the Rigidbody Kinematic. But when he gets hit you want him to turn into a Ragdoll and be affected by physics. To accomplish this, you simply disable the isKinematic property. Kinematic Rigidbodies play better with other Rigidbodies. For example if you have an animated platform and you want to place some Rigidbody boxes on top, you should make the platform a Kinematic Rigidbody instead of just a Collider without a Rigidbody. You might want to have a Kinematic Rigidbody that is animated and have a real Rigidbody follow it using one of the available Joints.
That answers it...
To sum: They're not affected by gravity.
ina is asking a question that is in NOWAY answered by your copy/paste.
"why would attaching a kinematic rigidbody help?" grab a dictionary and look up the word "WHY". look at this sentence and try answer "WHY"?::: "$$anonymous$$inematic Rigidbodies play better with other Rigidbodies." WHY? extra processing would likely be part of it... how much would be the next logical question that helps answer WHY do they suggest using them for lots of movement...
It does answer why to use them... That was the question as you said... It doesn't get affected by gravity, is a reasoning as to why you would/wouldn't want to use it... I guess that's how I took it...
What you were answering was why would you want to use a kinematic rigid body ins$$anonymous$$d of a non-kinematic rigid body. His question was why you would use a kinematic rigid body ins$$anonymous$$d of a collider alone, without any rigid body.
Your answer
Follow this Question
Related Questions
Workaround to Non-Convex mesh colliders with non-Kinematic RigidBodies? 1 Answer
Rigidbody stuck in corners of Mesh Collider 0 Answers
Simple Collider Test - Sphere Falls Through Mesh 1 Answer
Turn Off Mesh.Bake Scaled Mesh PhysX CollisionData ? 0 Answers
How to allow collisions on a Child of a Non Kinematic RigidBody ? 1 Answer