# 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.

## 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 on other sites
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 on other sites
Hehe, just thinking about calculating the diffrence instead of undoing the rotations helped me solve it, thanks :)

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 33
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631745
• Total Posts
3002000
×