|
I found this tip in http://unity3d.com/support/documentation/Manual/Physics.html But I would like to know why? What sort of problems can this create?
(comments are locked)
|
|
A rigidbody component controls the GameObject it's attached to. The velocity get's calculated in worldspace. If you parent a rigidbody to another, the child will get additional "forces" (actually the gameobject will move along with the parent, so no real forces) that will make the child do crazy things. A rigidbody represents one single physic object. Parent-child relationship doesn't work here. If you want two rigidbodies to be bound together, use joints. Which joint does the same as Parent-Child? I want want an object to have the same movement as another object.
May 04 '11 at 12:27 PM
Aldwoni
Are you sure that you need the secondobject to be a seperate rigidbody? If you parent an object (without a rigidbody) to another it will be part of the rigidbody of the parent. Anyway the FixedJoint is what you want: http://unity3d.com/support/documentation/Components/class-FixedJoint.html
May 04 '11 at 12:54 PM
Bunny83
I have 3 objects. Object A is the movable object for the player. Object B has a Fixed Joint with Object A. Object C is an item the player has to pick up. When you pick Object C, it becomes a child of Object B. I now kill the rigidbody of Object C before make it Child of Object B. But now, Object C scales and rotates when it is pick up or dropped down. Do you know a solution?
May 04 '11 at 01:50 PM
Aldwoni
(comments are locked)
|
