Game Development Community

Viewing direction

by Jendrik Posche · in Torque Game Engine · 07/02/2008 (6:34 am) · 2 replies

Hi All,

I'm wondering how I can retrieve the view direction of the camera.
I have :

GameConnection* conn = GameConnection::getConnectionToServer();
conn->getCameraObject()

But somehow I can't access it's view direction. Any ideas?

Regards

#1
07/02/2008 (10:48 am)
MatrixF camTransform = conn->getCameraObject()->getRenderTransform();
VectorF camForwardVector;
camTransform.getColumn(1, &camForwardvector);

tdn.garagegames.com/wiki/Torque/Understanding_Object_Transforms
#2
07/07/2008 (7:22 am)
Thanks