Game Development Community

SceneWindow2D.mount()

by Bucko · in Torque Game Builder · 04/05/2005 (3:10 pm) · 3 replies

Most camera methods come in two flavours:
setCurrentCameraXXX and setTargetCameraXXX
This is really neat for doing pullbacks, pans etc but mount() and dismount() calls lack the Target version
Change mount(); and dismount(); to
setCurrentCameraMount(); and setCurrentCameraDismount(); // Consistency!
the please give us
setTargetCameraMount(); and setTargetCameraDismount(); // Consistency!

Typically I have my camera mounted, dismount it to do some fancy stuff and then mount it again afterwards.
Now I have to dismount();
Call the various TargetXXX calls and startCameraMove() calls.
Then I must schedule a call to mount() the camera again with the same delay as the duration of my TargetXXX.

#1
04/05/2005 (7:28 pm)
Hmm, good suggestion... though right now you could add our own function like that in script, especially if you already have it all worked out

function fxSceneWindow2D::setTargetCameraMount(%this, %time, %obj)
{
%this.setTargetCameraXXX(%obj.getPosition());
%thisstartCameraMove(%time);
%this.schedule(%time, mount, %obj);

}

note that is just a rough idea, will want to check names
#2
04/06/2005 (12:20 am)
...which I think is what I said in my post ;)
#3
04/06/2005 (12:24 am)
Yep, you are definately right, sorry if that came out as me trying to repeat what you just said... meant to just point out (unless you already know this then forget what I'm saying) that you could add a function call (mine was just a quick demo of what you said in your post) in script that would make your own function... so you could do

SceneWindow2D.setTargetCameraMount(5, $player);

without requiring a change to the engine :) again if you realize this then feel free to ignore this suggestion