Page 1 of 1

Move along line of sight

Posted: 23.04.2004, 10:43
by ajtribick
I'm trying to write a script that moves the camera along the line of sight, however the problem is that somewhere in the middle of this I need to be able to change the orientation of the camera, via a center { } command or equivalent.

I have a nasty suspicion this won't work in .cel scripts though.

Posted: 23.04.2004, 20:10
by don
Could you post a few lines of the code you are trying to use?

Posted: 23.04.2004, 20:25
by ajtribick

Code: Select all

{

select { object "Zeta2 Reticuli" }
goto {
   time 2
   distance 52.5
}
wait { duration 2.5 }
move {
   duration 10
   velocity 3e6
}
print {
   text "End"
   row -3
   duration 3
}
wait { duration 3 }

}


Using the syntax at http://www.donandcarla.com/Celestia/cel_scripting/guide/v1_0d_Cel_Script_Guide.htm#_Toc60995038, I expected this to move the camera towards Zeta Reticuli.

Although the move command isn't exactly what I want, what I really want to do is set the velocity (equivalent of pressing A or Z) and then carry on execution of the script, not set the camera to move for a certain duration then stop.

Posted: 23.04.2004, 21:05
by don
Hi chaos,

The example code you point to has been corrected but not yet posted. The velocity parameter is a vector, which means 3 values need to be specified -- one for each axis (X, Y, and Z). Your example would be...

Code: Select all

move { duration 10 velocity [0 0 3e6] }


... where the 3e6 value would be placed in one of the 3 places (currently in Z).

In reality, each of the 3 individual vector values would be a number (positive or negative) in order to move the camera along a given path. However, I do not know how to arrive at the necessary values, as vectors are something I do not fully understand.

Maybe someone else could help out here?