Advanced Camera zoom.
by Danny Mejia · in Torque Game Engine · 04/22/2007 (7:11 pm) · 1 replies
This there any way I can get the Advanced Camera to zooming in and out?
I have something like this:
function serverCmdZoomOut(%this)
{
%this.advCamera.setThirdPersonOffset("0 (-10+1) 5");
}
moveMap.bind(keyboard, k, ZoomingOut);
function ZoomingOut(%val)
{
if(%val)
{
commandToServer('ZoomOut');
}
}
But the function never quit calling it just keping zooming out. Could some one help me with this?
Thanks for your help.
I have something like this:
function serverCmdZoomOut(%this)
{
%this.advCamera.setThirdPersonOffset("0 (-10+1) 5");
}
moveMap.bind(keyboard, k, ZoomingOut);
function ZoomingOut(%val)
{
if(%val)
{
commandToServer('ZoomOut');
}
}
But the function never quit calling it just keping zooming out. Could some one help me with this?
Thanks for your help.
About the author
Torque 3D Owner mb
function ZoomingOut(%val) { if(%val) { commandToServer('ZoomOut'); } else { return; } }or maybe like:function ZoomingOut(%val) { if(%val) { if ( $zoomed != 1 ) { commandToServer('ZoomOut'); $zoomed = 1; } } else { $zoomed = 0; } }