Hello,
I encountered a problem to compute 2 rotations for a VR game.
Imagine a driver in a car. i have to cumulate the rotation of the car itself (the "parent" rotation) with the rotation of the head's driver (via the GetRawRotationVectorW2,X2,Y2,Z2 commands).
so i try to multiply quaternions getting the camera quaternion (GetCameraQuatW,X,Y,Z commands) before getting the head quaternions and compute them using this formula (non-commutative so i tried to inverse quat1 & 2 but it's resulting in the same behaviour) :
W = w₁ × w₂ - x₁ × x₂ - y₁ × y₂ - z₁ × z₂
X = w₁ × x₂ + x₁ × w₂ + y₁ × z₂ - z₁ × y₂
Y = w₁ × y₂ + y₁ × w₂ + z₁ × x₂ - x₁ × z₂
Z = w₁ × z₂ + z₁ × w₂ + x₁ × y₂ - y₁ × x₂
but the resulting quaternion seems to make my camera totally uncontrollable
i'm missing something but what ?