Improve proxy locomotion, tier & jump sync

Fix multiple proxy animation issues: stale graph Speed collapsing jog into walk, missing slow-walk/jog tiers, and jump takeoff/landing not playing. Key changes:

- Prefer position-derived movementSpeed when animationGraphSpeed is missing/stale (ResolveLocomotionGraphSpeed) and fall back to graph Speed only when it agrees within a tolerance; sender now transmits movementSpeed when local graph read is 0 and TryReadLocalAnimationGraphSpeed falls back to SpeedSmoothed.
- Introduce locomotion tiers (Walk/Jog/Run) with ComputeLocomotionTier and sync ints (iSyncWalkRun/iSyncLocomotionSpeed/iSyncJumpState) to the graph; fire corresponding tier events when starting or changing tier.
- Fix proxy motion application: persist per-proxy velocity and worldDelta so the Update hook does not zero-out controller motion; use measured frame motion to drive animation when network flags are sparse.
- Restore correct jump behavior: fire MT/weapon-compatible jump events for takeoff and landing (JumpUp/JumpStartFrom*/jumpLand/jumpLandTo*), clear bInJumpState on landing and remove the extra proxy-side jump hold so landings exit the jump loop.
- Misc: add constants and thresholds for tier/run/walk/run-land decisions and update logs to include tier labels.

Files updated: plugin/include/F4TProxyAnimationSync.h, plugin/src/F4TProxyAnimationSync.cpp, plugin/src/F4AnimationDescriptor.cpp, plugin/src/F4TProxyPuppet.cpp, plugin/src/F4TProxyActorController.cpp, plugin/src/main.cpp, and docs/dev-log.md.
This commit is contained in:
2026-06-05 15:48:16 +12:00
parent 6a38e7226c
commit a137821406
7 changed files with 368 additions and 73 deletions
+88
View File
@@ -7,6 +7,94 @@ failed experiments, successful tests, and next steps.
---
## 2026-06-05 - Locomotion Tier + Jump Takeoff Fix (Round 2)
### Summary
Fixed three root causes from the 15:34 session log where proxies showed only medium-walk
cadence, default forward (jog) looked like walk, and jump takeoff never played (landing only).
### Files Changed
- `plugin/include/F4TProxyAnimationSync.h`
- `plugin/src/F4TProxyAnimationSync.cpp`
- `plugin/src/F4AnimationDescriptor.cpp`
- `plugin/src/F4TProxyPuppet.cpp`
### Details
**Stale animationGraphSpeed overriding movement tiers (log evidence):**
- `Proxy anim diag` showed `recvMovementSpeed=9.0, recvAnimGraphSpeed=148.8` and
`recvMovementSpeed=58.6, recvAnimGraphSpeed=182.2` — graph readings lagged a full send
interval behind position-derived speed, collapsing jog into walk-tier animation.
- Fix: `ResolveLocomotionGraphSpeed()` now uses `movementSpeed` as primary; only adopts
`animationGraphSpeed` when it agrees within 40% of movementSpeed.
**Within-walk cadence stuck at medium pace:**
- `F4TProxyPuppet` Update hook re-applied `SyncControllerMotionFields` with **zero velocity**
every frame, undoing the real velocity written by `ApplyProxyLocomotionFrame` after `Move()`.
- Fix: persist per-proxy `velocity` and `worldDelta` in locomotion state; hook re-applies them.
**Jump takeoff missing:**
- All RaiderRoot events (`JumpStandingStart`, `jumpLand`, etc.) logged `graphAccepted=false`.
MTBehavior/WeaponBehavior use `JumpUp`/`JumpFullBody`/`JumpLayerOn` for takeoff and
`JumpDown` for landing.
- Fix: fire MT/weapon jump events on takeoff/land; added `iSyncJumpState` + `iSyncWalkRun`
to the humanoid descriptor (0=walk, 1=jog, 2=run from graph Speed bands).
### Testing
- `xmake build` succeeds.
- In-game: slow-walk, jog (default W), run should differ; jump should show takeoff + land.
- Log: `computedGraphSpeed` should track `recvMovementSpeed` when graph was stale; jump events
should include `JumpUp`/`JumpFullBody`.
---
## 2026-06-05 - Slow-Walk/Jog Speed + Ground Jump Landing Fix
### Summary
Fixed the remaining two animation issues reported after the graph-variable name correction:
proxies only showed walk/run (no slow-walk/jog), and ground jumps never exited the jump loop.
### Files Changed
- `plugin/include/F4TProxyAnimationSync.h`
- `plugin/src/F4TProxyAnimationSync.cpp`
- `plugin/src/main.cpp`
- `plugin/src/F4TProxyActorController.cpp`
### Details
**Slow-walk / jog missing (log evidence):**
- `Local send diag` showed `movementSpeed=58.5` with `localGraphSpeedRead=0.0` on many frames.
- Receivers treated `animationGraphSpeed=0.0` as valid and drove graph Speed to 0, collapsing
all sub-run paces to idle/walk. Only when the live graph read returned ~176 or ~373 did
jog/run appear.
- Fix: `ResolveLocomotionGraphSpeed()` ignores animationGraphSpeed unless it is above the idle
threshold; falls back to position-derived `movementSpeed` (~1:1). Sender now transmits
`movementSpeed` when the local graph read is 0. `TryReadLocalAnimationGraphSpeed` also
tries `SpeedSmoothed` as a fallback.
**Ground jump never ends:**
- Takeoff used `JumpStart`; landing tried `moveStart`/`moveStop`, which does not exit the
ground-jump loop (table drops work via a different fall path).
- Proxy also held `isJumping` for 400ms after the network cleared, delaying landing events.
- Fix: use real FO4 events from behavior-graph research:
- Takeoff: `JumpStandingStart` / `JumpDirectionalStart`
- Landing: `jumpLand` + `jumpLandToWalk`/`jumpLandToRun` + `JumpStandingEnd`, clear
`bInJumpState`, then re-assert locomotion.
- Removed proxy-side jump hold; sender's 200ms hold is sufficient.
### Testing
- `xmake build` succeeds.
- In-game: slow-walk (~50-75), jog (~150-220), run (~300+) should each blend via graph Speed;
ground jumps should land and return to locomotion. Check log for `jumpLand` events with
`graphAccepted=true`.
### Known Issues
- Jump land run/walk threshold (150 u/s) may need tuning against in-game feel.
- Sprint animation tier still depends on `IsSprinting` + speed floor, not yet verified.
### Next Steps
- Verify all three locomotion tiers and ground-jump landing in a fresh log.
---
## 2026-06-05 - Fix False Jump State Masking Locomotion Animation
### Summary