Clientside position and rotation
by Robert Rourks · in Torque Game Engine · 12/01/2002 (11:43 am) · 1 replies
I can't seem to figure out how to get the position and rotation of the camera in clientside scripts. Any help would be appreciated. Something along the lines of %player.getEyeVector(), except a clientside version.
Thanks in advance,
Thanks in advance,
About the author
Torque Owner Sam Guffey
commandToServer('getClientCamInfo'); function serverCmdGetClientCamInfo(%client) { commandToClient(%client, "getCamInfo"); } function clientCmdGetCamInfo(%client) { if(!isObject(%client)) return; %cam = %client.camera; %trans = %cam.getTransform(); // Heres the position and rotation. %pos = getWords(%trans, 4, 6); %rot = getWords(%trans, 0, 3); }Im sorry if this is totally screwed I dont have access to the source atm, but I think this is real close if not right on.