Page 3 of 3

Re: Mouse control

Posted: Fri May 27, 2011 3:26 pm
by another_commander
The change to invert the mouse y-axis is a trivial one to code, but since we are in feature freeze, I cannot push it in the repository right now. However, if anyone is interested in building from source as per instructions here, adding the feature is as simple as opening up the file PlayerEntityControls.m in src/Core/Entities, finding the method named - (void) pollFlightArrowKeyControls:(double)delta_t, which on my copy of the source starts around line 2616, scrolling down where it shows

Code: Select all

if(mouse_control_on || (numSticks && !keyboardPitchOverride))
	{
		double stick_pitch = max_flight_pitch * virtualStick.y; // <<<<<<<<<<  - Change this line
		if (flightPitch < stick_pitch)
		{
			[self increase_flight_pitch:delta_t*roll_delta];
			if (flightPitch > stick_pitch)
				flightPitch = stick_pitch;
		}
		if (flightPitch > stick_pitch)
		{
			[self decrease_flight_pitch:delta_t*roll_delta];
			if (flightPitch < stick_pitch)
				flightPitch = stick_pitch;
		}
		pitching = (fabs(virtualStick.y) >= deadzone);
	}
around line 2758 and changing

Code: Select all

double stick_pitch = max_flight_pitch * virtualStick.y;
to

Code: Select all

double stick_pitch =  - max_flight_pitch * virtualStick.y;
i.e. just adding a minus sign after the equals. This will invert the mouse y axis. Recompile and play.

Ideally, this would be a game option or a defaults file setting to YES/NO, but the above should be good enough for those who can't stand the standard flight-sim way of mouse handling.

Re: Mouse control

Posted: Sat May 28, 2011 2:33 am
by pc2099
Thanks for the warm welcome. When it comes to Elite I was born and raised on a stick but that was a good 20 years ago and I haven't played a flight sim since. Im going to try playing with the inverted mouse and see how I like it but I also like the idea of playing with an xbox 360 controller. Can this be done easily on a PC running XP?

Re: Mouse control

Posted: Sat May 28, 2011 1:06 pm
by JensAyton
pc2099 wrote:
Thanks for the warm welcome. When it comes to Elite I was born and raised on a stick but that was a good 20 years ago and I haven't played a flight sim since. Im going to try playing with the inverted mouse and see how I like it but I also like the idea of playing with an xbox 360 controller. Can this be done easily on a PC running XP?
Microsoft has software for using the controller with Windows XP. After setting that up, it should just work like any other joystick.