Get direction of a moved object

bigbob85

26-05-2009 09:21:38

Hey,
If I have something, say a car, and it gets hit by something else, say a ball, how do you get the direction that the car is facing now?
I've tried getting orientation and stuff, but that still is all 0's.

I also tried getting the scene node of the body, but that didnt help either.

Using NxOgre 1.0.22T5.

betajaen

26-05-2009 09:30:40

Get the yaw angle of the getGlobalOrientation or the node's getOrientation would do it.

bigbob85

26-05-2009 09:47:00

Cheers for the quick reply, I'll try that in a tick.

EDIT: Worked perfectly.