What am I doing wrong? (trying to get the camera transformation)
by Dean · in Torque Game Engine · 06/13/2007 (1:13 am) · 0 replies
I'm trying to put a function in default.bind.cs that needs the camera's transformation to perform a calculation. (I'm using the advanced camera by the way)
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5471.
I can't seem to figure out how to do this though. here's an example of me trying to get the transformation and echo it:
function gettrans(%val)
{
%camtrans = LocalClientConnection.advCamera.getTransform();
echo(" %camtrans =",%camtrans );
}
my function runs and doesn't give me any errors like it cant find getTransform... it just always gives me 0 0 0 1 0 0 0 . Any other functions i try with advCamera, like getPosition for example, give me either 0 or nothing at all. So my guess is I'm just trying to access advCamera improperly.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5471.
I can't seem to figure out how to do this though. here's an example of me trying to get the transformation and echo it:
function gettrans(%val)
{
%camtrans = LocalClientConnection.advCamera.getTransform();
echo(" %camtrans =",%camtrans );
}
my function runs and doesn't give me any errors like it cant find getTransform... it just always gives me 0 0 0 1 0 0 0 . Any other functions i try with advCamera, like getPosition for example, give me either 0 or nothing at all. So my guess is I'm just trying to access advCamera improperly.