[ODE] Pitch and roll euler angles

Brian Clarkson brianclarkson at btconnect.com
Sun Jul 18 09:13:52 MST 2004



>I'm working on a racing game which will run on a motion simulator with full
360
>degrees of motion for pitch and roll (no yaw).  The simulator requires
pitch
>and roll angles (in degrees) and angular velocity (in degrees for each
axis).
>.I've been working on extracting continuous pitch and roll angles from the
body
>(based on angular velocity) yet I can't get it quite right.  I was hoping
>someone here may have a suggestion of how to do this or could spot what I'm
>doing wrong.

Luigi

I do something similar and it works fine for me. dBodyGetAngularVel()
returns velocities in world space so
you need to transform to body space. You can now accumulate the angles from
the velocities. Dont forget the
accelerations. Also dont forget the time step. ie.

   Angle += ((LastAngularVel + CurrentAngularVel) / 2.0f) * TimeStep;

Brian..




More information about the ODE mailing list