Page 1 of 1

are key commands adjustable?

Posted: 12.06.2004, 16:00
by wasj2004
Is there a way to change the speed of the goto command? In other words, when I press G to goto the selected target can I adjust the speed so there is acctually a little travel time rather than an instant trip? also, the center command "c". if the target is 180 degrees out of site when I press c to center it can it be set so the screen will pan around slow?

Posted: 13.06.2004, 17:02
by don
Sorry, this is not currently possible.

Posted: 15.06.2004, 14:40
by howard
Hmmmmm

This sounds like someone else who could use a flightpath generation/editing interface/tool.

see the thread on flightpaths....

Howard

Posted: 15.06.2004, 18:24
by Harry
Not exactly a perfect solution, but you can use a CELX-script to intercept the "g" and "c" keys and perform the necessary commands with a longer duration instead. This looks like this:

Code: Select all

function celestia_keyboard_callback(key)
  local script = nil
  if key == "g" or key == "G" then
    script = celestia:createcelscript("{ goto { time 10.0 } }")
  end
  if key == "c" or key == "C" then
    script = celestia:createcelscript("{ center { time 5.0 } }")
  end
  if script then
    while script:tick() do end
    return true
  end
  return false
end

celestia:requestkeyboard(true)

while true do
  wait(10)
end


There is an ugly problem: the "special keys" stop working: everything which is used for speed-control (a,z,q, f-keys) and cursor keys. a,z and q could be reimplemented in the script, but everything else doesn't work with the current key-handling code.

Note that the CELX-script uses embedded CEL-scritps to execute the goto, simply because this was easier as CEL uses the current selection, while CELX doesn't.

Harald

Posted: 20.05.2005, 10:27
by neo albireo
Harry, your script is great. Celestia is just much more elegant when the "g" command uses p.e. 30 sec and the "c" command 10 sec. When you watch Celestia on your home cinema, everything else is too fast and makes the planets, moons and stars look very light in weight.
Is there a way to do the same with the "home" and "end" command (to get nearer or farther away from an object)? I always end up 1m away from the surface because my computer is loading textures and not stopping to travel in this time. That would be great!