gotoloc from cel url

All about writing scripts for Celestia in Lua and the .cel system
Topic author
abourov
Posts: 3
Joined: 19.01.2007
With us: 17 years 10 months

gotoloc from cel url

Post #1by abourov » 19.01.2007, 03:12

Hi,

I am writing a .cel script and am trying to use the gotoloc command to go to a position I recorded from a cel url.

The url is: cel://Follow/Earth/2007-02-06T02:14:25. ... 7&lm=49152

However every time I try to write the script, the camera moves to a random point and simply does NOT go where I want it to!

The script I have written is:

Code: Select all

{
time { utc "2007-02-06T02:14:25.0000" }

timerate { rate 1 }

select { object "Sol/Earth" }
center { }
follow { }
setframe { coordsys "universal"}
gotoloc {
time 5
x "gPAn/7pUbUyyDA"
y "D0beK1NwgP7//////////w"
z "TmzXcLoWYlX1/////////w"
ow 0.662127
ox -0.352722
oy 0.642429
oz 0.156393
}
}


Can anyone recognise what is wrong with the script? Have I taken the wrong values from the cel url? Have I forgotten to put in some parameters ? Any help much appreciated!

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

Post #2by Adirondack » 29.01.2007, 11:28

abourov,

delete the 'setframe' line (universal is Celestia's default) or replace the line with:

Code: Select all

setframe { ref "Sol/Earth"
           coordsys "universal" }


Does this help?

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
abourov
Posts: 3
Joined: 19.01.2007
With us: 17 years 10 months

Post #3by abourov » 29.01.2007, 23:29

Yes, thank you!

Topic author
abourov
Posts: 3
Joined: 19.01.2007
With us: 17 years 10 months

new problem :?:

Post #4by abourov » 12.02.2007, 01:03

Hi, there is now a new problem though.

The gotoloc command works fine, but when I use it to go to a view in space with a spacecraft it loads in a dodgy manner. I.e. when I load a view of saturn with Voyager II in the foreground, what happens is that the view of saturn loads fine, then about 1.5 second later Voyager II just zooms into its position.

Would there be any way to make it any smoother? I have tried preloading Voyager2 but it is still a really fast zoom effect. Would any other factors be influencing the way in which the url position is loaded with the gotoloc command?

Thanks heaps...


Return to “Scripting”