Game Development Community

Querying vehicle heading

by Brandon Smith · in Torque Game Engine · 01/26/2007 (3:56 pm) · 1 replies

Hello,

Is there a way I can query the direction a vehicle is facing? (from within a "Vehicle" member function?)

Thanks

#1
01/26/2007 (5:21 pm)
Hah, nevermind. Got it.
MatrixF mat;
   getEyeTransform(&mat);
   VectorF v2;
   mat.getColumn(1,&v2);
   char* buff = Con::getReturnBuffer(100);
   Con::errorf( ConsoleLogEntry::General, "%g %g %g",v2.x,v2.y,v2.z);