This is probably an easy one: how can I get the rotation around one axis (the Y axis) ?
I only need the rotation around this axis to make a rotate*, so I need to know the angle's value for this axis.
Thanks
Getting rotation
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Re: Getting rotation
Well, this is not a Bullet specific question, but a math question.This is probably an easy one: how can I get the rotation around one axis (the Y axis) ?
Yo need to extract Euler angles from a quaternion. There are a lot of methods for doing it (and a lot of different conventions/combinations).
Some of these methods can be found in the btMatrix3x3 class (getEulerXXX(...) or something like that); other are missing.
I remember an old post about it, in which I posted some methods that work for my needs: http://www.bulletphysics.org/Bullet/php ... 40&start=0.
Hope you may find it useful.