- Home /
Rotation around z-axis always local space and not world? Vector-axis angle projection calcuations.
It appears that rotating gameobjects in the editor around the z-axis always rotates the object around the local z-axis instead of the world z-axis unlike rotating around the x and y axis which both rotate around the world-axis.(Even when specifically using transform.rotate and space.world the z-axis rotating is still using the local z-axis)
How does one go, mathematically, from a purely world-space x,y,z rotation to a rotation about z that only rotates about the local z-axis and not the world axis?
I suppose I am going to have to learn quaternion math? If so, any good references would be appreciated.
To give an example of what I am trying to do: I am trying to calculate a projection of a vector onto the x-y-z axis, and currently getting the rotation about what should be the world x-y-z axis'. Ie: For the projected angles the calculations obtain the rotations about the world axis where it rotates around x-axis for the y angle, z-axis for the x angle, and y-axis for the z angle.
Your answer
Follow this Question
Related Questions
Transform.Rotate producing unexpected results when being used after setting localEulerAngles 0 Answers
localEulerAngles.x changes when the angle is close to -90 in the inspector 2 Answers
Whats the Difference Between Rotation EulerAngles and Quaternions? 2 Answers
How to use a negative value when MathF.Clamping a eulerAngle? 1 Answer
Incrementing Rotation Produces Strange Transform Values 1 Answer