Page 1 of 1

Script equivalent for right-click-drag

Posted: 12.01.2008, 06:20
by jrichelle
I'm new at writing .cel scripts, sorry if this is very basic.

I'm looking for the command (or commands combination) that permit to do the displacements as can be done with the right-click-drag of the mouse.

Re: Script equivalent for right-click-drag

Posted: 12.01.2008, 10:26
by Vincent
jrichelle wrote:I'm new at writing .cel scripts, sorry if this is very basic.

I'm looking for the command (or commands combination) that permit to do the displacements as can be done with the right-click-drag of the mouse.

You may want to have a look at Don Goyette's Cel scripting guide:
http://celestiamotherlode.net/catalog/d ... ation.html

Here's a summary of what it tells about the orbit command:

Code: Select all

orbit { duration [number], rate [number], axis [axis] }

duration :Number of seconds to orbit the object.
rate : Speed at which to orbit the object, in units of degrees per second. Positive and negative values are used to indicate the direction of orbit
axis: Define which axis to orbit around [X Y Z]. Set the X, Y, or Z value to 1 for yes, 0 for no. You may also specify multiple axes. For example, to specify X as the axis, use [1 0 0], for Y use [0 1 0], and for Z, use [0 0 1]. To specify both, the X and Y axes, use [1 1 0].

The following example orbits Saturn for 12 seconds:

Code: Select all

select { object "Sol/Saturn" }
center { }
goto   { time 3
         distance 8
         up [ 0 1 0 ]
         upframe "equatorial" }
wait   { duration 3 }
orbit  { axis [ 0 1 0 ]
         rate 30
         duration 12 }

Re: Script equivalent for right-click-drag

Posted: 13.01.2008, 22:10
by jrichelle
Vincent wrote:...You may want to have a look at Don Goyette's Cel scripting guide:
http://celestiamotherlode.net/catalog/d ... ation.html

Here's a summary of what it tells about the orbit command:

Code: Select all

orbit { duration [number], rate [number], axis [axis] }

...


Thanks a lot, I miss it.

Regards,
Jean