# TORSO.CPP / .HPP — reconstruction notes `Torso` (: PowerWatcher) drives torso twist (horizontal) and weapon elevation (vertical). Tuning rates/limits stream from the resource (`horizontal/verticalRotationPerSecond`, `horizontal/verticalLimit*`, `torsoHorizontalEnabled`). ## Reconstructed - Ctor: streams the base rates (deg→rad) + limits + `horizontalEnabled`, primes `currentTwist`/`currentElevation`/analog axes to 0, and installs `TorsoSimulation` as the per-frame Performance (the replicant copy is console-driven via `TorsoCopySimulation`, still staged). - `analogElevationAxis` / `analogTwistAxis` members + `SetAnalogElevationAxis` / `SetAnalogTwistAxis` setters (written by `MechControlsMapper::InterpretControls`). - `CurrentTwist()` / `CurrentElevation()` / `GetHorizontalEnabled()` accessors. - `TorsoSimulation(Scalar)` — per-frame aim integration (authentic core): - `currentElevation += analogElevationAxis · baseElevationRate · dt`, clamped to [verticalLimitBottom, verticalLimitTop]; - if `horizontalEnabled`: `currentTwist += analogTwistAxis · baseTwistRate · dt`, clamped to [horizontalLimitLeft, horizontalLimitRight]. **VERIFIED** (`BT_MECH_LOG` `[mppr] torsoElev=`, forced-input `BT_FORCE_ELEV`): stick pitch 0.8 slews the elevation up and clamps at the authentic `verticalLimitTop` = 0.349 rad = **20°**. Zero Fail. ## Skeleton-joint binding (2026-07-21) The twist joints are now RESOLVED and BOUND: the ctor calls `owner->ResolveJoint(torsoHorizontalJoint / torsoHorizontalShadowJoint)` (the skeleton is live — see MECH.NOTES.md), stores them as `Joint*`, and `TorsoSimulation` pushes `currentTwist` onto `horizontalJointNode` via `Joint::SetRotation` (hinge → `Radian`; ball → `EulerAngles` yaw). The bring-up TEST.EGG mech has a FIXED torso (`horizJoint=''`, `enabled=0`), so its twist path is inert — correctly guarded (null joint → no apply, no crash). A torso-twist mech drives the joint. Verified headlessly; the VISUAL rotation needs the renderer. ## Elevation does NOT drive a gun joint (corrected 2026-07-21) Checked BT411 before reconstructing a "gun-elevation joint": no such joint binding exists anywhere in the authentic engine. `currentElevation` instead composes into `Mech::eyepointRotation` (the cockpit-eye / weapon-boresight pitch) — see MECH.NOTES.md "PHASE 5.3 INCREMENT 5". `TorsoSimulation` only needed to keep advancing the scalar state, which it already did; the missing piece was the CONSUMER (`Mech::Simulate`'s eyepoint composition), now reconstructed and verified (`torsoElev` == `eyePitch` every frame). ## Deferred - HUD free-aim slew, the look-button state machine (`BTCommitLookState` / `gBTLookPitch`/`gBTLookYaw` — composes with elevation into the full eyepoint), `TorsoCopySimulation` (replicant console-driven aim) — still staged.