[ODE] Damned Euler Angles

Mark Fournier mfournier at artech.ca
Thu Apr 6 09:41:00 MST 2006


I am trying to place physical objects in our editor by applying forces based
upon distances and allowing the object to settle into place, respecting
physics. Works like a charm for position, but orientation is another matter:
the torque accumulated forces (tacc in the body struct) are in euler angles,
which means that I have to base them on the difference between target euler
angles and current euler angles (yes, I hate euler angles too, but I'm not
being given a choice here.) I'm trying to derive the angles from the body's
R matrix, but I noticed that the At vector used to derive the X angle (the
third row of R) is not a unit vector, which is very strange. This means that
the values I'm getting for X are all over the place. Is this a bug in ODE,
or am I missing something here?

I'm still using v 0.5 because I've made some modifications to it so I can
stream large terrain meshes to and from disk rather than create them on the
fly, hiding access to certain structures within the namespace of those
structures. Can anyone remember whether there been a fix to the code base
since then that addresses this problem, or can allow me to do this with
euler angles?



More information about the ODE mailing list