Game Development Community

camera motion speed setup

by Ehrlich · in Torque Game Builder · 06/10/2009 (8:31 pm) · 1 replies

hello.

i asked this about 2 months ago, when i was about to finish my last project, and for some odd reason, the post got stuck in the general forum, so i got no replies, so im posting it here again, so maybe i can get an answer to that qustion.

here goes:


************************
hello there.

it's been awhile since last time i worked iwth TGB, but now, im in the middle of something, and i need to know if theres a simpler way of doing it.

let's see...
with the command, setCameraInterpolationMode, you can setup the speed at which the camera moves in TGB (when you use zoom or something), but i see there are only 2 interpolation modes there, Linear and Sigmoid.

thing is, i want my camera to zoom even slower than in linear mode... is there a command in TS to achieve that?

cuz i've got a workaround for that, but its a lil clumsy... so i just had to ask.

thank you in advance for your time.
************************

as i understand it, with Sigmoid mode, the camera moves intempestively, and kinda fast, while on linear mode, the camera moves smoothly... thats ok, but what if i want the camera to move at a certain speed, while smoothly?... is it possible?, if so, how?

thx in advance.

About the author

Computer Science Engineer, with interest in Graphicl Computing, unconventional I/O devices and Artificial Intelligence (for games)


#1
07/08/2009 (1:02 am)
The mode itself isn't a speed control, it's more of an accelleration control. For linear, the camera maintains a constant speed whereas the sigmoid gives a non-linear (specifically an S-shape) movement. The sigmoid provides a slow accelerationthen constant speed then slow deceleration. The camera doesn't have a direct speed control because that would only work for linear (it's the only one with a constant speed) and the idea was that you could add your own so that would be a redundant parameter. Instead, you can specify the time take to make the complete move. When telling the camera to actually move, you can specify the time using "startCameraMove( 1.5 )" which tells it to take 1.5 seconds. You can use this to indirectly control the speed. If you use linear then this time can obviously be used to equate the speed by dividing the distance by this time.