Get heading from Body?

Backov

02-06-2007 22:33:06

I've tried using getGlobalPose().Vector3(), but the value returned doesn't seem to be what I want (it seems to be the up vector).

I need a vector, not a quat (can't seem to find code to convert a quat to a heading vector).

Pottej

03-06-2007 03:14:59

If by heading you mean a velocity vector (i.e. the direction it is travelling) then just use getLinearVelocity().

Backov

03-06-2007 06:03:15

No I didn't actually, but I figured it out. Had to get it from the node, strangely.