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.
Script equivalent for right-click-drag
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
Re: Script equivalent for right-click-drag
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 }
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Re: Script equivalent for right-click-drag
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