I am trying to make a chain of objects parented under each other all match the rotation of the highest object. For instance, if I have 5 objects and I rotate the topmost in the hierarchy, they will all curve together into a spiral. Object 1’s rotation might be 10 on z, so 2 would also be 10, and thus have double rotation. But it seems to be being zeroed out. Here is the code on each child object:
#pragma strict
private var orig : GameObject;
function Start () {
orig = GameObject.Find('def_hair1');
}
function Update () {
this.gameObject.transform.rotation.eulerAngles = orig.transform.rotation.eulerAngles;
}
Thanks for any help you might be able to provide!