Hi,
I have a rotation matrix that at certain frames has a determinant of -1. As I have understood, this tells that the matrix is not a real rotation matrix, that it contains a reflection. I have a “gimbal lock”, right?
Anyway, I have seen some sample sourcecode that deals with this by first checking if the determinant is -1. If it is, then all cells of the rotation matrix are negated (R[i][j] = -R[i][j]).
If I do that, I still have to rotate my matrix -180 around the z-axis, for some reason. And after that, the graphics seem to be “heightened” a little bit.
Anybody got a suggestion/solution to this problem?
-And no, I am not converting to quaternions (unless you have a painless way of going from a rotation matrix with determinant=-1 to a correct unit quaternion)
Thanks!!!
Torbjørn