Posts by JGL

by JGL
04.03.2009, 21:17
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

I believe that that problem is that orbit() calls in C++ have no effect when the Observer is in "Travelling" mode.

Code: Select all

void Observer::update(double dt, double timeScale)


Does anyone else have any advice on how to alter this to allow orbiting while the camera is moving?
by JGL
04.03.2009, 21:04
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Specifially, I am issuing C++ orbit commands: Quatf q(1.0f); float coarseness = ComputeRotationCoarseness(*sim); q = q * Quatf::yrotation((float) (dt * -KeyRotationAccel * coarseness * numberOfMessagesThisTick)); sim->orbit(q); while the script isn't running a obs:goto lua command. When it "goi...
by JGL
04.03.2009, 20:43
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Thanks for all your help Selden, does anyone else have any ideas about how to change the orbit of the camera in C++ while a CelX script is running?
by JGL
04.03.2009, 19:47
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Hey Selden, I am not using the command line method, everything is happening within Celestia. I have modified Celestia to receive the position of the person within its main loop - i.e. within CelestiaCore::tick()). I have the CelX script that I described previously, it is not generated - it is a stat...
by JGL
04.03.2009, 19:20
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Hey Selden, Thanks for your response. I think there is some confusion - all I am doing within the LUA Celx script, is picking a random star and travelling to it. All the user interaction is coming from the C++ side. I can only get information about the position of the user from within C++, not on th...
by JGL
04.03.2009, 18:02
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Aha, I realised that luahook isn't what I want, a call to runScript(fileName) worked perfectly.
by JGL
04.03.2009, 17:57
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

In addition, if I want to load a LUA script from C++ is:

Code: Select all

int loadScriptStatus = luaHook->loadScript("/Users/joel/Library/Application Support/CelestiaResources/scripts/randstar.celx");


The correct approach?
by JGL
04.03.2009, 17:35
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Hey Selden, Would this be a sensible approach (PSEUDO CODE) obs:center(star, timeToLook) DO MULTIPLE CALLS OF wait(0.01) HERE, TO ALLOW THE ORBIT TO ADJUST, UNTIL WE HAVE WAITED A TOTAL OF timeToLook obs:goto(star, timeToTravel) DO MULTIPLE CALLS OF wait(0.01) HERE, TO ALLOW THE ORBIT TO ADJUST, UNT...
by JGL
04.03.2009, 16:37
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Re: Modifying Celestia to allow orbiting while a script runs

Hi Selden, Thanks for your quick reply. If you see my CelX script, I call wait() after each center or goto command: obs:center(star, timeToLook) wait(timeToLook) obs:goto(star, timeToTravel) wait(timeToTravel) Where should I put my wait(0.01) calls? Once I have told Celestia to goto the star in ques...
by JGL
04.03.2009, 14:18
Forum: Development
Topic: Modifying Celestia to allow orbiting while a script runs
Replies: 14
Views: 8588

Modifying Celestia to allow orbiting while a script runs

Hey All, I am currently modifying Celestia to create an interactive installation. The idea is to allow a person to walk into the installation, and as they move from left to right, have the viewpoint they see on the projection screen update - a pseudo VR effect. I am using Openframeworks (http://www....

Go to advanced search