Only if you make a math or implementation error. Quaternions are degenerate nowhere. Choose a convention: say X to right, Y forward and Z up. The choice doesn’t really matter. Some quaternion ‘q’ rotates arbitrary vector ‘v’ by qvq-1. True for all ‘q’ except zero. OK there’s one degenerate case that we don’t care about because we’ll restrict to unit quaternions to simplify computation and increase numeric robustness. So the equation reduces to qvq*
Extracting forward ‘f’ (in this case) becomes f=qYq = q(0,1,0)q.
Let q = (x,y,z)+w:
f = (2(xy-wz), w2-x2+y2-z2, 2(wx+yz))
since |q| = 1
f = (2(xy-wz), 1-2(x2+z2), 2(wx+yz))
So this code snippet extracts forward:
float tx = x+x;
float tz = z+z;
v.x = tx*y - tz*w;
v.y = 1 - tx*x - tz*z;
v.z = tx*w + tz*y;
For a +/-Pi rotation: ‘w’ is zero and x2+y2+z2 =1:
f = (2xy, 2y2-1, 2yz)
for any axis of rotation independent of “Y” then y = zero:
f = (0, -1, 0)
exactly as expected.