Torso elevation (pitch aim) wired: the pod stick's Y axis lives

The mechs could always tilt their aim up/down -- Torso models the full
vertical axis (currentElevation, rate, VerticalLimitTop/Bottom,
recenter) and EVERY 1995 control mode routes stickPosition.y into
Torso::SetAnalogElevationAxis -- but the desktop bridge hard-zeroed
stick Y, so the axis was dead on a keyboard rig.  The one pod control
the remap left unwired.

- btinput: JoystickY axis -> elevTarget/elevActive/elevAbsolute
- mech4 shim: sElev integrator (same walk/spring model as the twist;
  X recenters pitch too via gBTElevRecenter)
- mechmppr bridge: feeds stickPosition.y every bridged frame (the old
  unconditional zero removed); both mode branches covered
- CONTROLS.MAP (+ numpad profile + compiled default): R/F = aim
  up/down, pad LeftStickY = elevation (was unused)
- torso.hpp: CurrentElevation()/ElevationVelocity() accessors (diag)
- [mppr] trace gains stickY (note: the trace reads AFTER the next
  frame's device push re-zeroes the stick -- input flows regardless)

Verified live: R held -> torso elevation climbs at the authored rate
and clamps at 0.349066 rad = exactly 20.0 deg (the Blackhawk's
VerticalLimitTop); release holds the aim.  The eyepoint correctly
stays level -- pitch aims the GUNS and reads on the HUD's vertical
elevation tape, as in the pod.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-18 16:44:22 -05:00
co-authored by Claude Fable 5
parent 0a77d8e54b
commit 1271d3bc76
8 changed files with 101 additions and 4 deletions
+12 -1
View File
@@ -47,7 +47,7 @@ enum BTAxisID
BTAxisRightPedal,
BTAxisPedals, // signed convenience alias: + = right pedal
BTAxisJoystickX, // the pod stick X = torso twist (Standard mode)
BTAxisJoystickY, // parsed + tracked; no consumer yet
BTAxisJoystickY, // the pod stick Y = torso ELEVATION (pitch aim)
BTAxisCount
};
@@ -240,6 +240,8 @@ static const char *sDefaultProfile =
"key Right axis RightPedal deflect 1\n"
"key Q axis JoystickX deflect -1\n"
"key E axis JoystickX deflect 1\n"
"key R axis JoystickY deflect 1\n"
"key F axis JoystickY deflect -1\n"
"key X action AllStop\n"
"key D1 button 0x40\n"
"key Space button 0x40\n"
@@ -258,6 +260,7 @@ static const char *sDefaultProfile =
"key F8 action Generator4\n"
"key F9 action Reconnect\n"
"padaxis LeftStickX axis Pedals deadzone 0.24\n"
"padaxis LeftStickY axis JoystickY deadzone 0.24\n"
"padaxis RightStickX axis JoystickX deadzone 0.24\n"
"padaxis RightStickY axis Throttle rate 0.75 deadzone 0.24\n"
"pad RightTrigger button 0x40\n"
@@ -953,6 +956,14 @@ void
next.twistTarget = twist;
next.twistActive = axisActive[BTAxisJoystickX];
next.twistAbsolute = axisAbsolute[BTAxisJoystickX];
// stick Y = torso ELEVATION (pitch aim) -- every 1995 control mode routes
// it to Torso::SetAnalogElevationAxis (mechmppr InterpretControls)
float elev = axisDeflect[BTAxisJoystickY];
if (elev > 1.0f) elev = 1.0f;
if (elev < -1.0f) elev = -1.0f;
next.elevTarget = elev;
next.elevActive = axisActive[BTAxisJoystickY];
next.elevAbsolute = axisAbsolute[BTAxisJoystickY];
next.leverRate = axisRate[BTAxisThrottle];
gBTInput = next;