Hi - I’m getting some weird things happening when I rotate a child object inside its parent. Currently, the elements rotate with these functions:
parent.transform.rotation = Quaternion.AngleAxis(parentRotationAmount, Vector3.up); //rotating around the Y axis
child.transform.rotation = Quaternion.AngleAxis(childRotationAmount, Vector3.right); //rotating around the X axis
which works if neither of them are rotating simultaneously, but if, as is the case in my game, the child object needs to rotate at the same time as the parent, what I get is that the child doesn’t maintain its proper orientation to its parent (should be rotating only on the x axis, not y). Anybody know how I can fix this?