are key commands adjustable?
are key commands adjustable?
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?
Sorry, this is not currently possible.
-Don G.
My Celestia Scripting Resources page
Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.
My Celestia Scripting Resources page
Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.
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:
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
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
-
- Posts: 68
- Joined: 03.02.2005
- With us: 19 years 9 months
- Location: Switzerland
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!
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!