|
The manual mentions that "you should never have a parent and child rigidbody together" http://unity3d.com/support/documentation/Manual/Physics.html Why is this? Does this apply to a kinematic rigidbody?
(comments are locked)
|
|
I would assume that if you have a rigidbody the child of another rigid body, imagine a small box that is a child of a big box next to each other. and they are both effected by gravity, when they hit the floor the big box would influence the movement of the small box conflicting with the physics calculations and thus giving you unpredictable and unrealistic results. If this is the answer then this would not apply to Kinematic Rigidbodies as their animations are not calculated. Just my guess. What if it's a fixed joint essentially two objects are treated as one combined object?
Dec 28 '11 at 01:03 AM
ina
(comments are locked)
|
|
If you read the page you've linked carefully you can read this ("Parenting"):
This applies only to normal Rigidbodies. Kinematic RBs aren't affected by any external forces. What if you have a combination of both regular RB's and kinematic RB's in one hierarchy?
Dec 28 '11 at 02:05 AM
ina
Ok, once and for all: Do not parent regular (non kinematic) Rigidbodys to other moving objects of any kind. Kinematic Rigidbodys doesn't have anything to do with physics, the only connection is they can wake up non kinematic Rigidbodies. That's all they're used for. That means you can parent them like any normal GameObject, even as a child of a non kinematic Rigidbody. Non kinematic Rigidbody represents physics objects. They are always simulated in world-space. Their position / velocity / angularVelocity belong the world. If you parent such an object to another moving object it will screw up the physics-based movement since the parent's movement / rotation is just "added" on top of the physics-simulation. You can of course parent non kinematic Rigidbody to static objects for grouping purposes, but they will still move on their own.
Dec 28 '11 at 02:34 AM
Bunny83
Bunny33. What about attaching a normal rigidbody to a kinematic rigidbody using a configurable joint? Do you think that would work for moving objects? I mean, if the kinematic rigidbody were moved via a character controller or directly with transform, translate, wouldn't the attached rigidbody trail along and still be affected by physics?
May 08 at 02:39 AM
tool55
(comments are locked)
|
