[ODE] rotation

pia dalusong ps_yumemi at yahoo.com
Tue Nov 5 02:15:02 2002


hello,

again...  sorry people.  i really don't get what i'm
doing wrong or why my rotation matrix doesn't work.

i have two variables:
dMatrix3 mobot_rotation 
const dReal *mobot_rot

i use the following code to pass the rotation matrix

mobot_rot = dBodyGetRotation(bodyID)
mobot_rotation[0]=mobot_rot[0]
...
mobot_rotation[11]=mobot_rot[11]

dBodySetRotation(bodyID, mobot_rotation)

it doesn't work? the bodies end up rotated wrong.

i also tried to use the same technique as the
settransform function in drawstuff.cpp

mobot_rotation[0]=mobot_rot[0]
mobot_rotation[1]=mobot_rot[4]
...
mobot_rotation[11]=0

and it still didn't turn out right. 

please help.  i really need to solve this problem.


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/