0
$\begingroup$

I am attempting to make my character do a backflip. I rotate the hips 360º in the X axis with a couple of keyframes, then watch the animation. It doesn't work. Either it doesn't seem to move at all, or it rotates in all the wrong directions.

I believe this is due to quaternion rotation vs. Euler rotation. In extremely simple terms, what is the difference, and how would I use Quaternions efficiently in solving this issue?

$\endgroup$
5
  • $\begingroup$ The numbers in quaternions are derived from half the angle of rotation and the direction cosines of the axis of rotation. Any angle greater than 180 degress will make the rotation go backward by an angle smaller than 180 degrees. Try using enough keyframes to make each one less than 180 from the previous. I'm a bit confused by quaternions myself, but unless someone who understands them better adds an answer, I'll try to cook up something more explanatory than this short comment. $\endgroup$
    – user27640
    Dec 4, 2018 at 21:50
  • $\begingroup$ I found another question that linked to a video of a fantastic explanation of quaternions (youtube.com/watch?v=FRD0PgsY3pU) that helped with this issue. $\endgroup$
    – Legoman
    Dec 4, 2018 at 23:03
  • $\begingroup$ That's great. Perhaps you should mark your question as a duplicate of that one? To do so, click the flag link under your question, and follow the instructions. $\endgroup$
    – user27640
    Dec 4, 2018 at 23:13
  • $\begingroup$ I'm pretty sure that the other question was on a bit of a different subject, the attached video just happened to give me enough information to figure out my problem...I probably could close this even without the duplicate, though. $\endgroup$
    – Legoman
    Dec 4, 2018 at 23:15
  • $\begingroup$ Don't close it. If there's no duplicate, you can add your findings as an answer, then accept that answer. It may well help somebody else in the future. $\endgroup$
    – user27640
    Dec 4, 2018 at 23:16

2 Answers 2

1
$\begingroup$

I can't say about how to fix the rotation but might I suggest just adding an object like a circle and setting it's origin to the center of mass of your character then parenting the armature and it's hierarchy to that object and just going from there.

$\endgroup$
1
$\begingroup$

Quaternions operate in a somewhat different way to Euler rotation. The reason the rotation was misbehaving is because Quaternions seem to break down when values are greater or less than 1.0 or -1.0, respectively. Multiplying certain values by -1.0 can reverse the interpolation, essentially solving the issue in this question.

A helpful explanation of Quaternion Rotation can be found here: https://www.youtube.com/watch?v=FRD0PgsY3pU

$\endgroup$
1
  • 1
    $\begingroup$ ..and if you really want to get into visualizing the maths, this exploratory site by 3Blue1Brown and Ben Eater is fantastic... $\endgroup$
    – Robin Betts
    Dec 5, 2018 at 10:22

You must log in to answer this question.

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