2018-08-17 09:45 EDT


View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0002436FSSCPgameplaypublic2015-03-05 17:25
Reporteriss_mneur 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.7.2 
Target VersionFixed in Version 
Summary0002436: Mouse controls ignore the axis binds
DescriptionIt doesn't seem to matter where you have the Joystick/Mouse X Axis or the Joystick/Mouse Y Axis is bound to. The mouse movement on the Y axis is always pitch and movement on the X axis is always yaw.
TagsNo tags attached.
Attached Files
  • patch file icon axis_fix.patch (1,042 bytes) 2015-03-05 13:45 -
    Index: playercontrol.cpp
    ===================================================================
    --- playercontrol.cpp	(revision 11268)
    +++ playercontrol.cpp	(working copy)
    @@ -637,22 +637,22 @@
     		if (Axis_map_to[JOY_HEADING_AXIS] >= 0) {
     			// check the heading on the x axis
     			if ( check_control(BANK_WHEN_PRESSED) ) {
    -				delta = f2fl( axis[JOY_HEADING_AXIS] );
    +				delta = f2fl( axis[Axis_map_to[JOY_HEADING_AXIS]] );
     				if ( (delta > 0.05f) || (delta < -0.05f) ) {
     					ci->bank -= delta;
     				}
     			} else {
    -				ci->heading += f2fl( axis[JOY_HEADING_AXIS] );
    +				ci->heading += f2fl( axis[Axis_map_to[JOY_HEADING_AXIS]] );
     			}
     		}
     
     		// check the pitch on the y axis
     		if (Axis_map_to[JOY_PITCH_AXIS] >= 0) {
    -			ci->pitch -= f2fl( axis[JOY_PITCH_AXIS] );
    +			ci->pitch -= f2fl( axis[Axis_map_to[JOY_PITCH_AXIS]] );
     		}
     
     		if (Axis_map_to[JOY_BANK_AXIS] >= 0) {
    -			ci->bank -= f2fl( axis[JOY_BANK_AXIS] ) * 1.5f;
    +			ci->bank -= f2fl( axis[Axis_map_to[JOY_BANK_AXIS]] ) * 1.5f;
     		}
     
     		// axis 2 is for throttle
    
    patch file icon axis_fix.patch (1,042 bytes) 2015-03-05 13:45 +

-Relationships
+Relationships

-Notes

~0014577

niffiwan (developer)

What's the desired behaviour here? I presume that you don't want to be able to assign Y to yaw and X to pitch - but perhaps you might want to (when using pitch/yaw on a joystick) assign Y on mouse to absolute throttle, or "freelook" with mouse, or up/down/left/right "sidethrust" on the mouse? To be honest, I think my examples sound a bit contrived.

Also - should this wait until after SDL for Windows is in trunk?

~0014579

The_E (administrator)

This definitely sounds like a thing we should resolve when we go for SDL everywhere to me.

~0014580

iss_mneur (developer)

Agreed.

~0016537

zookeeper (developer)

I might be missing something, but according to my tests the attached patch should fix the issue in trunk, and allow binding any of pitch/yaw/bank to any axis.

~0016538

zookeeper (developer)

Fix committed to zookeeper@11275.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2011-05-19 21:15 iss_mneur New Issue
2012-12-26 04:09 niffiwan Note Added: 0014577
2012-12-27 07:31 The_E Note Added: 0014579
2012-12-27 21:29 iss_mneur Note Added: 0014580
2012-12-27 21:29 iss_mneur Product Version 3.6.13 => 3.7.2
2015-03-05 13:45 zookeeper File Added: axis_fix.patch
2015-03-05 13:46 zookeeper Note Added: 0016537
2015-03-05 17:25 zookeeper Changeset attached => fs2open zookeeper r11275
2015-03-05 17:25 zookeeper Note Added: 0016538
2015-03-05 17:25 zookeeper Status new => resolved
2015-03-05 17:25 zookeeper Resolution open => fixed
+Issue History