Skip to content
  • Pierre Guilbert's avatar
    Fix SLERP interpolation for quaternions · 4ad1b65e
    Pierre Guilbert authored
    1/ The dot product is made between the axes of the rotations represented
       by the quaternions instead of between the quaternions themselves. Hence,
       the SLERP is made for the rotation's axes and not for the quaternions.
    
    2/ A rotation can be represented by two quaternions (q and -q). To prevent
       the SLERP to take the long path on the unit sphere we add a check the
       sign of the dot product. If it is negative, we replace q by -q to take
       the short path
    4ad1b65e