Hi. I’m trying to get the Child GameObjects of a Parent to rotate relative to the Parent’s Y axis, but they only appear to be rotating on the Global Y axis instead.
I have two private Quaternion values;
LWingExtend = Quaternion.Euler(0.0f, rb.rotation.y + 90.0f, 0.0f);
RWingExtend = Quaternion.Euler(0.0f, rb.rotation.y - 90.0f, 0.0f);
Which become active when a certain parameter is true. The bool is fine and I have this working so that the child objects rotate when this is true, but the issue is on the rotation itself. The Slerps for this are;
FrontWingL.rotation = Quaternion.Slerp(FrontWingL.rotation, LWingExtend, Time.deltaTime);
FrontWingR.rotation = Quaternion.Slerp(FrontWingR.rotation, RWingExtend, Time.deltaTime);
So I’m trying to say, when bool is true, rotate the child gameobject from it’s start rotation to the new quaternion rotation, which works, but it appears to be on the global axis and not the parent axis, so when I rotate the parent further the children just stay in the same rotation. Any help would be awesome!