Getting rotation

jpaires
Posts: 4
Joined: Sat Nov 28, 2009 9:50 pm

Getting rotation

Post by jpaires »

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 :)
Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: Getting rotation

Post by Flix »

This is probably an easy one: how can I get the rotation around one axis (the Y axis) ?
Well, this is not a Bullet specific question, but a math question.

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.