centre/orbit

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Paul L
Posts: 17
Joined: 11.08.2003
With us: 21 years 4 months
Location: In and around 115E 31S

centre/orbit

Post #1by Paul L » 08.10.2008, 04:22

Hi,

This is driving me crazy. Is there a way to simulate the centre/orbit (shift + c) command in a script ? I'm trying various combinations of "centre", "lock" and "follow" without success, and I'm hoping to avoid the necessity to specify coordinates for my reference object.

Many thanks,

Paul

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 11 months
Location: Nancy, France

Re: centre/orbit

Post #2by Vincent » 08.10.2008, 12:00

The observer:centerorbit Celx function is what you're looking for.
Please have a look at the Celx scripting chapter of the Celestia wikibook.
@+
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

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 9 months

Re: centre/orbit

Post #3by Adirondack » 08.10.2008, 12:06

Paul L,

if you want to do this with a CEL script:

Code: Select all

select { "Objectname" }
center { }

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)
The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Topic author
Paul L
Posts: 17
Joined: 11.08.2003
With us: 21 years 4 months
Location: In and around 115E 31S

Re: centre/orbit

Post #4by Paul L » 09.10.2008, 01:36

If I use "centre" I lose my reference object (I wish to follow both objects as if I was using "lock" and then "centre/orbit" - shift + c.

I'll take a look at the lua stuff, but was hoping there was a way of doing this in a CEL script.

Thanks for your replies.

Paul


Return to “Scripting”