Jump to content
  • Advertisement
Sign in to follow this  
Samurai Jack

Quaternion Child / Parent question

This topic is 2427 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a question regarding hierarchy and quaternions:

Usualy, when you have a child joint matrix and a parent matrix, the "child world matrix" = "child local matrix" * "parent world matrix".
So far, so good. The problem rises here:

If I compute my local matrix like this: rotation from quaternion to matrix and then apply the translation AND then multiply it with a parent rotation, don't I run again in the danger of gimbal lock?

The situation:
1.) local = rotation matrix from quaternion
2.) local add translation (x,y,z)
3.) world matrix = "local matrix" * "parent.world matrix"- isn't that dangerous? Gimbal lock?

Thank you in advance!
Feel free to post.

Share this post


Link to post
Share on other sites
Advertisement
I was also wondering:

a) Can gimbal lock ONLY appear when you compose a rotation matrix
b) can gimbal lock appear when you multiply two allready computed rotation matrices (child by parent) ?

Share this post


Link to post
Share on other sites
Gimbal lock means that you have several orthogonal roations happening in some order, and one rotation is of a kind so your coordinate system (or originally the gimbal) appears to "lose" a subsequent axis of rotation, for example by rotating the x onto the y axis. This is problematic for Euler angles, because they do just that, rotate around one axis at a time.

Unit quaternions (and matrix rotations) are equivalent to rotation around an arbitrary vector that you specify directly (in one step), so there is no such problem per se, in one rotation. But of course it is in general possible to generate something like gimbal lock with 2 or 3 subsequent rotations, too. But there's not much you can do about that, really. Nor do I think it's a problem, that's just a property of orthogonal rotations in 3D space.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!