- Home /
Child not following parent's rotation
I'm, trying to make an object rotate by using
rigidbody.AddTorque(Vector3.forward totalForce 10000);
And the object starts to rotate, however the childs that represent the body don't follow the reotation, like so: https://www.youtube.com/watch?v=3yfZLPxSpe4
I'm applying the torque on an empty object that is the parent (the axis on the video)
Does anyone know why this is happening and how I can try to fix it?
Can you do something like this (on the child): gameObject.transform.rotation = transform.parent.rotation?
I thought the issue was that the child object didn't rotate with the parent? Apply whatever you want to the parent (as in your AddTorque example) and the child with the above line will set its rotation = to the parent.rotation
$$anonymous$$aybe I didn't expose my problem correctly. I didn't want the child to rotate, I wanted the child to be affected (to have a translation movement) by the parent's rotation. Basically I wanted to have a smooth movement on the Blue and Red pieces of the video.
I was already able to fix it though. Thx for the help and time
Answer by Duolasa · Aug 25, 2013 at 09:12 PM
I managed to fix my problem by setting the children as Kinematic. Don't know how this fix it but it did...
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
C# Find component InChildren 3 Answers
Instantiated GameObject gets spawned as a child 2 Answers
Get Children of Child and Deactivate/Activate on Demand 1 Answer