Absolute rotations depending on axis?

Hi,

Happy new years and wish you the best;

The PG:
Rotations
Please open a console and look at the third column, which is the absolute rotation of the camera.

My question is: why isn’t it possible to completely tilt the camera on the x axis (doing a like looping), while it is possible on the z axis (full roll).

The X axis will stop and come back in a different orientation (complicating animations scripts) while the Z will continue the loop as usual.

X axis will do
[-pi/2; pi/2], => -1.57, -1.56.., 1.56, 1.57, 1.56...
while Z will do a continued range [-pi; pi] like so:
-3.14,…, 0,…, 3.14, -3.14

The looping at X poles is noticeable.
So:

  1. What is the best way to achieve a full,clean, loop on the x axis?
  2. will that behaviour be consistent in the future? (I will adapt my scripting around that)

Thanks

Ok,

Issue comes from the up vector, which is axis Y…

Hello and happy new years! This is a side effect of using Euler angles to represent rotations, and in this case quaternions would be a better solution: 10 mins GameDev tips - Quaternions - YouTube

3 Likes

Did I hit the gimbal lock?