Jump to content
  • Advertisement
Sign in to follow this  
Sairon

Quaternion rotations problem

This topic is 4090 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

My game character has a upper and lower body which are seperated by a manually controllable bone. In local space this bone is axis aligned with the Y axis. What I want to do is rotate the lower and upper body seperately. This in order to be able to run in one direction and aim in another. So I let the lower part of the body be affected by the parent scenenode rotation, which works perfectly. However the problem arise when I want to undo the scenenode rotation on the upper body and then apply the new rotation. The rotation which describes the orientation of the upper body is in a Vector2 consisting of X & Z describing which way the upper body should face. This Vector2 describes the look direction in world space. The entire matter isn't done easier by the fact that linear algebra isn't my strongest area, and quaternions in particular. Any input appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Why do you want to undo the scenenode rotation? I would think you would want to concatenate the lower body (scenenode) transform with the local-space upper-body transform to yield a world-space upper-body transform (which doesn't involve any 'undoing' of transforms).

Perhaps you could describe the problems you're running into in a little more detail.

Share this post


Link to post
Share on other sites
Hehe, just thinking about calculating the diffrence instead of undoing the rotations helped me solve it, thanks :)

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!