Quaternion - switching from right-handed to left-handed

1.4k Views Asked by At

I have a rotation quaternion in my 3D model and it uses the right-handed coordinate system. Now I'd like to convert it into a left-handed since my game engine (Unity) uses left-handed.

These are the axis in my 3D model

enter image description here

while these are the axis in my destination engine

enter image description here

I read around that first I need to negate the imaginary part and then apply a $M$ matrix that will convert between right-handed and left-handed. For the case above I tried with

$q_{rh} = q0 + q_1i + q_2j + q_3k$

$M = \begin{bmatrix}-1 & 0 & 0\\0 & 0 & 1\\0 & 1 & 0\end{bmatrix}$

$q_{lh} = q0 + q_1i - q_3j - q_2k$

but the animation I set up didn't work anymore. Am I getting something wrong? To add more context: I imported the model switching the sign of the X axis for all of its vertices.