Re: Mouse control
Posted: Fri May 27, 2011 3:26 pm
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
around line 2758 and changing to 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.
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);
}
Code: Select all
double stick_pitch = max_flight_pitch * virtualStick.y;
Code: Select all
double stick_pitch = - max_flight_pitch * virtualStick.y;
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.