[ODE] Understanding rotation
Nolan J. Darilek
nolan at thewordnerd.info
Thu Nov 11 19:28:11 MST 2004
Thanks to the feedback I've received, I've managed to come up with a
somewhat workable solution to yesterday's problem. In solving that,
though, I realized that I've got another problem. Specifically, I
don't understand how rotating bodies works, and am hoping someone can
help.
My physics model is based on "arcade" physics--that is, objects move
in the direction in which they point. Each object currently stores
theta and phi values, and a speed. From this I'm able to calculate
velocity, but I'm not certain about how to set the rotation quaternion
to rotate the object in the direction if its velocity. Initially I
believed that the first three elements of the rotation quaternion
equaled the velocity but with a unit length of 1, though additional
reading/research is quickly ridding me of that notion. :) Given theta
and phi angles, how do I calculate rotation quaternions?
I'm also confused about how to project a ray from an object's line of
travel. According to what I've read, rays extend from their body's
local Z axis. Is there any way to make a ray's local Z coincide with
a body's line of travel?
Thanks a bunch!
More information about the ODE
mailing list