Unity - change only z axis rotation to 0

by Green_qaue   Last Updated September 10, 2019 18:13 PM

I have a child where I want the rotation to work like (parentRot, parentRot, 0).

So first I set its localRotation to 0, meaning it will get the parents rotation: child.localRotation = Quaternion.identity;

But how can I make sure the world rotation (not local) value of the z axis stays at 0?



Related Questions


Updated April 14, 2015 20:05 PM

Updated May 13, 2015 12:43 PM

Updated April 03, 2015 21:22 PM

Updated June 04, 2015 12:05 PM

Updated June 04, 2015 14:05 PM