feat: Implement Phase 6a Airborne Mechanics and Landing Absorption

- Added new scene file `test_fall.scene` for testing airborne dynamics.
- Created architecture proposal in `PHASE_6a_AIRBORNE_LANDING.md` detailing airborne momentum, procedural air pose, and landing impact absorption mechanics.
- Developed specifications in `phase_6a_airborne_landing.md` outlining implementation decisions, targets, and static contracts for the airborne system.
- Introduced focused regression tests in `test_phase6a_airborne_landing.gd` to validate airborne pose, momentum, landing timeline, and queue behavior.
- Ensured all tests pass with 100% assertion success.
This commit is contained in:
2026-09-17 19:09:54 -04:00
parent 3e39fd9287
commit 2071ee03b7
10 changed files with 1871 additions and 45 deletions
+13
View File
@@ -416,6 +416,19 @@ assembled in a "Whole Stickman" preview that supports translation, rotation, and
weights, world-space stance locks, and a predictive 24 px foot-penetration guard. It also filters
lower floors beneath overlapping ramps and applies centerline pelvis compensation. `DEBUG_TERRAIN`
is `false` in the shipped build; temporary `[terrain]` traces are opt-in.
- **Phase 6a airborne/landing:** extends the PLAY-only terrain controller with internal
`TerrainMotion.AIRBORNE` and `LANDING_IMPACT` phases while keeping `RigState.ANIMATED`. Ledge
departures inherit signed grounded X velocity and apply exponential drag (`AIR_DRAG_X = 0.75`);
airborne horizontal travel uses a swept query against each of the ten synchronized collision
proxies and stops at the first safe fraction. The captured live hand/foot pose receives additive
flail, with hands reaching canonical local `+X` before lifting; the LEFT root mirror supplies the
opposite screen-facing direction. Falls below `HARD_LANDING_MIN_FALL_HEIGHT = 80` px land softly;
fall distance through 900 px scales torso compression `32..160` px and downward hand drop
`270..520` px across the 0.08 s compress + 0.22 s recover timeline. Both feet lock to
independent terrain samples, the upright root remains unrotated, and `LANDING_IMPACT` blocks
primary queue progression while overlay speech continues. Direct ragdoll and terrain disable
cancel the procedural pose cleanly. `tests/test_phase6a_airborne_landing.gd` passes 24/24
assertions; the implementation is user-verified (2026-09-17).
- **Phase 3a director functionality:** adds navigation/walking, speech, an action queue, and a
queue-runner state machine. Enums `RunnerState { IDLE, EXECUTING }` and `ActionPhase { NONE,
WALKING, SPEAKING, WAITING, RAGDOLLING, RECOVERING }`. Constants `FOOT_OFFSET := (0, -385)`