2
$\begingroup$

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.

  • 2
    If you're negating the imaginary part, you should have $$ q_{\ell h} = q_0 \color{red}- q_1i -q_2j - q_3k $$2017-02-08
  • 0
    @Omnomnomnom how come? I thought I should first get all negatives and then multiply by that matrix (so $q_1$ would become positive again)2017-02-08
  • 0
    Well, you can compare that to the output of multiplying $q_{rh}$ by $M$2017-02-08
  • 0
    @Omnomnomnom That would be the complex conjugate I suppose, but I still don't get it2017-02-08
  • 0
    I think that all the bit you read is saying is that to flip the coordinate system, just take the conjugate of your quaternion before applying the usual computations.2017-02-08

0 Answers 0