Page 1 of 1

how to swap the up & down key functions?

Posted: 14.01.2008, 10:33
by einstein_1961
Hi to all,

Is there a possibility or an easy way to reverse the up & down navigation key functions??

I am loosing all the fun and thrill in chasing commets or asteroids in free flight (my favorite) because of this, I tryed alot to adapt but it seems I can't get used to it, hence I give up and quit.
Can anyone help with a script or something to acheive this? I am sure that many share the same difficulty.

Thanks in advance,
Raffi

Posted: 15.01.2008, 09:23
by vibes
Hello out there,

I also have problems changing directions. Up and down follow the arrows as shown on the keyboard, left and right move the other way. This is really annoying when commanding the spaceship, it is not possible to move intuitively, and I regularly end up crashing into Jupiter or so. I checked the config file but could not find anything to change the attributions.

is there a solution?

thanks, Tommy

Re: how to swap the up & down key functions?

Posted: 15.01.2008, 12:01
by Brendan
einstein_1961 wrote:Hi to all,

Is there a possibility or an easy way to reverse the up & down navigation key functions??

I am loosing all the fun and thrill in chasing commets or asteroids in free flight (my favorite) because of this, I tryed alot to adapt but it seems I can't get used to it, hence I give up and quit.
Can anyone help with a script or something to acheive this? I am sure that many share the same difficulty.

Thanks in advance,
Raffi


It works something like a flight simulator with the up and down arrows. The up arrow could be seen as pushing the control stick making the craft tilt down and the down arrow pulling the stick back, making it tilt up.

Another way of looking at it is the arrows controlling which direction the objects you are looking at appear to move in instead of a spacecraft because there really is no spacecraft in the program.

A way to reverse the up and down arrows is to open the celestia.cfg file, find the value RotateAcceleration and make it negative. But that would reverse the left and right arrows too.

In the CelestiaCore:tick() function, I found the keyboard bindings for the up and down arrows.

Code: Select all

 2303                 if (keysPressed[Key_Down])
 2304                     av += Vec3f((float) (dt * fov * -KeyRotationAccel), 0.0f, 0.0f);
 2305                 if (keysPressed[Key_Up])
 2306                     av += Vec3f((float) (dt * fov * KeyRotationAccel), 0.0f, 0.0f);


All it would take to reverse the up and down arrows without affecting the left and right arrows would be changing the signs and recompiling. It shouldn't be too hard to make an configuration file option that controls these signs if there isn't already one. I'm only set up to compile in Linux and have nothing set up for Windows right now.

Posted: 15.01.2008, 12:11
by Brendan
vibes wrote:Hello out there,

I also have problems changing directions. Up and down follow the arrows as shown on the keyboard, left and right move the other way. This is really annoying when commanding the spaceship, it is not possible to move intuitively, and I regularly end up crashing into Jupiter or so. I checked the config file but could not find anything to change the attributions.

is there a solution?

thanks, Tommy


Which arrows are you using? The keyboard and keypad arrows commands are listed in controls.txt and given below.

Code: Select all

Left/Right Arrows : Roll Camera
Up / Down Arrows  : Change Camera Pitch
Shift+Arrows      : Orbit object


Code: Select all

Number pad:
4  : Yaw left
6  : Yaw right
8  : Pitch down
2  : Pitch up
7  : Roll left
9  : Roll right
5  : Stop rotation


If you want to reverse the behavior of both the yawing and pitching commands, opening the celestia.cfg file and making the RotateAcceleration value negative.

If you want to reverse the yaw and pitch behaviors separately, it shouldn't be too hard for me to add options for that. I think I may have added some option to an extended version of Celestia a long time ago, but I don't remember exactly what I did.

Posted: 15.01.2008, 14:04
by vibes
hello dear Brendan,

thank you for your kind reply!

Let me be more concise about the problem: Using 8 the Earth shown on the screen moves up, using 2 the Earth moves down. Using 4 it moves to the right, using 6 it moves to the left.

That means up/down moves to the same direction as the numbers are placed on the keyboard, left/right to the opposite direction. So if you command the spaceship by the numbers, its hard to remember you have to press the right button (6) to put the earth to the left, but the upper button (8) to put it upwards.

So left button puts the earth right, right button left, but upper button puts it up, lower button puts it down. Very annoying!

But, ahaaa! Like a flight simulator! When i try to imagine a joy stick on the numbers pad it seems intelligible to me. Well, I never sat in a cockpit, but thats a very good suggestion. I think I get it right now.

thank you very much!

Tommy

PS: I dont know how the smiley came in, i just wrote 8...