I have OpenGL (Right handed coordinates, Y-up, -Z forward) 4x4 transformation matrix that rotates the yaw correctly, but pitch and roll are flipped. Position is also correct.
Is there a way to flip the rotation around the z-axis to actually rotate around x-axis and vice versa?
Transformation matrix [
x1 y1 z1 w1
x2 y2 z2 w2
x3 y3 z3 w3
0 0 0 1
]
I have tried to decompose T R S out of the matrix and multiplying only the rotation matrix with coordinate system changing matrices without success. E.g. I have tried:
Identity matrix with x and z flipped [
0 0 1
0 1 0
1 0 0
]
S
order and second for the desired oneD
then convert fromS
to some matrixM
and then fromM
toD
... – Spektre