4
$\begingroup$

I'm making a rolling animation of my character.

After rolling 360 degrees, when the character gets to its initial pose, the rotation quaternion goes from (1,0,0,0) to (-1,0,0,0)

That's a known "feature" of quaternions: q and -q represent the same rotation. However, when the quaternion rotates 360 degrees, q becomes -q. you need to rotate 720 degrees to get +q again.

It causes trouble in interpolating between frames. the character will erroneously rotate 360 degrees if I copy the initial pose to the last frame. it is because one is interpolation between (1,0,0,0) and (-1,0,0,0)

Is there any way to fix it?

$\endgroup$
1
  • $\begingroup$ Hello. A solution might be to set a keyframe with the rotation to 180° at the middle of your animation that way the interpolation doesn't go the wrong way $\endgroup$
    – Gorgious
    Oct 31, 2023 at 9:04

1 Answer 1

4
$\begingroup$

When a quaternion keyframe causes troubles because it's inverted, you can use this operator to flip it's values without affecting its orientation.

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Wow.. and there I was, about to launch an essay.. :D $\endgroup$
    – Robin Betts
    Oct 31, 2023 at 10:13
  • $\begingroup$ I was worried about cycling animation. at the end frame the quaternion is inverted. That might cause trouble when mixing with another animation in the NLA $\endgroup$ Oct 31, 2023 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .