[ODE] Confusion with getRotation()

Jason _____ jgmath2000 at hotmail.com
Fri Nov 28 05:57:59 MST 2003

OK, when I do getRotation on a body, I should get a 3x4 matrix with the unit 
vectors for the front, side, and top vectors, with 0's in the 4th column, 

My code looks like this:

#define X 0
#define Y 1
#define Z 2
printf("%.02lf %.02lf %.02lf --- %.02lf %.02lf %.02lf --- %.02lf %.02lf 

and when my ragdoll's stance stablizies (he's sort of hunched forwards) the 
printf gives me:

1.00 -0.00 -0.00 --- 0.00 0.84 0.54 --- -0.00 -0.54 0.84

The first one would be right if it was the side vector, since the chest is 
pointing in the y-axis.
The second one and the third ones make no sense, since they don't even add 
up to 1.  Am I reading those two from the matrix wrong?

Just eyeballing it, the vectors should be:
front:  0.00  0.80  -0.20
side:  1.00 0.00 0.00
top:	 0.00 0.20 0.80

Any ideas on what's going on?

<html><DIV>Jason Gauci </DIV>"If a packet hits a pocket on a socket on a 
port, and the port buffer is flooded at the very last resort, then a packet 
pocket socket error the buffer must report"</html>

Set yourself up for fun at home!  Get tips on home entertainment equipment, 
video game reviews, and more here.   

More information about the ODE mailing list