luahooks and the gotolonglat command

All about writing scripts for Celestia in Lua and the .cel system
Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 4 months

luahooks and the gotolonglat command

Post #1by Chuft-Captain » 08.11.2012, 14:04

I've struck a bit of an issue where I'm trying to execute the following commands within the context of Lua_Edu_Tools:

Code: Select all

         obs:gotolonglat(parent, 0, math.rad(90.0), distance, 1.0, celestia:newvector(0,1,0))
         obs:follow(parent)

This gotolonglat() command should go to a distance above the north pole of the parent, but instead goes all the way to the center of the parent and stays there.
Works fine in Celestia, but not within Lua Tools.

Anyone have any ideas on a workaround? The issue, I suspect, is probably due to the fact that the gotolonglat() is dealing with time as one of it's parameters (the 5th argument), and therefore may be fighting with the hook for control of the rendering cycle.
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
jogad
Posts: 458
Joined: 17.09.2008
With us: 15 years 7 months
Location: Paris France

Re: luahooks and the gotolonglat command

Post #2by jogad » 08.11.2012, 15:24

Works perfect for me :lol:
Probably, the distance value is zero.
The distance is the distance in km from the center of the body.

If it doesn't work for you, please provide an example with the actual values used.

Avatar
Topic author
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 4 months

Re: luahooks and the gotolonglat command

Post #3by Chuft-Captain » 09.11.2012, 23:15

OK,

Not a bug in Celestia 1.6.1.
Turns out that this is only a problem in the special celestia-v1_7x-svn5213 builds provided by Abramson.
Thanks for your test Jogad.

CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS


Return to “Scripting”