Stabilize proxy visibility and smooth movement
Fix proxy orbiting and improve motion/visibility handling. - Capture a per-slot visibleDebugAnchorPosition (reset on reassignment) to keep pre-placed proxies visually stable and avoid orbiting when the local player moves. - Remove the debug +20Z offset so pre-placed actors remain grounded. - Add GetRuntimeProxyVisibleTargetPosition to compute a stable visible target (anchored base + scaled remote delta). - Replace teleport-heavy updates with smooth movement: add InjectProxyMovementVelocity to publish velocity into bhkCharacterController, call Actor::Move() per-frame and inject velocity for animation blending. - Prefer reusing pre-placed pool proxies before attempting dynamic spawn. - Implement dynamic spawn via NEW_REFR_DATA / TESDataHandler::CreateReferenceAtLocation, apply debug visibility to spawned actors, and store handles in the dynamic pool. - Harden debug visibility setup: explicitly enable/disable 3D, alpha, display geometry, set 3D update flags and queue a TaskQueueInterface 3D update; expand debug logging. - Remove unsafe currentProcess target-clearing code and other minor cleanups. - Add dev-log entries describing Phase 6 debugging and fixes.
This commit is contained in:
+71
-1
@@ -4328,4 +4328,74 @@ The compilation errors were mostly API surface mismatches between the codebase a
|
||||
|
||||
This is a good indication that the phased, iterative approach is working - we can disable unverified Phase 4 code and proceed with Phase 6 testing.
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-03 - Phase 6 Proxy Orbit Fix
|
||||
|
||||
### Observation
|
||||
|
||||
In-game testing showed the pre-placed proxy now appears with an idle animation, but it moves relative to the local player and can appear to orbit as the local player moves or turns.
|
||||
|
||||
### Cause
|
||||
|
||||
The debug visibility mapper recalculated the proxy's visible base position from the local player's current position/heading every update. A stable remote target could therefore map to different visible positions whenever the local player moved or rotated.
|
||||
|
||||
### Fix
|
||||
|
||||
- Added a per-slot `visibleDebugAnchorPosition` captured once when the remote player is assigned.
|
||||
- Reset that visible anchor when a slot is reassigned to a different remote player.
|
||||
- Removed the debug `+20Z` offset so the pre-placed actor stays grounded.
|
||||
- Enabled the per-frame smooth movement pass from `Update()` so proxies receive continuous `Move()` calls toward their current target.
|
||||
|
||||
### Build Status
|
||||
|
||||
✅ **SUCCESS** - Plugin rebuild succeeded and the DLL was installed to the F4SE folder for the next in-game test.
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-03 - Phase 6 Proxy AI/Locomotion Iteration
|
||||
|
||||
### Observation
|
||||
|
||||
The pre-placed proxy now has collision and a stable independent position, but vanilla NPC AI still tries to walk away while the plugin holds the proxy at the remote client's position. Locomotion animations still do not visibly play when remote walk commands arrive.
|
||||
|
||||
### Cause
|
||||
|
||||
Active movement updates were still snapping the proxy to each network target with `SetPosition()`. That preserved sync, but collapsed most movement into teleports and left little continuous controller motion for the animation graph. The proxy's vanilla package was also still free to choose its own movement destination.
|
||||
|
||||
### Fix
|
||||
|
||||
- Disabled the temporary "preserve all AI for animation testing" flag.
|
||||
- Re-enabled AI movement intent suppression, but kept it to higher-level APIs only: `SetCommandType(kNone)`, `EndInterruptPackage(false)`, `InitiateDoNothingPackage()`, and `ClearAttackStates()`.
|
||||
- Removed the risky direct `currentProcess` handle/target clearing from the suppression path.
|
||||
- Changed active proxy packet updates to store a target instead of teleporting every update.
|
||||
- Kept snapping only for first activation, explicit snap movement, or large corrections.
|
||||
- Updated the per-frame mover to call `Actor::Move()` toward the target and inject the same velocity into `bhkCharacterController::SetLinearVelocityImpl()`.
|
||||
|
||||
### Build Status
|
||||
|
||||
✅ **SUCCESS** - Plugin rebuild succeeded and the DLL was installed to the F4SE folder for the next test.
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-03 - Phase 6 AI Suppression Rollback
|
||||
|
||||
### Observation
|
||||
|
||||
The game crashed immediately after adding a fake client. The log stopped after assigning the pre-placed proxy from the pool and before the normal transform/animation diagnostics.
|
||||
|
||||
### Cause
|
||||
|
||||
The crash correlated with disabling `g_preserveProxyAIForAnimationTesting` and re-entering the active `NeutralizeProxyActor()` path on slot assignment. Even after removing direct `currentProcess` target writes, the safe-looking combat/package calls in that path are still not safe enough to run during proxy assignment.
|
||||
|
||||
### Fix
|
||||
|
||||
- Restored `g_preserveProxyAIForAnimationTesting = true`.
|
||||
- Disabled `kEnableProxyAIMovementIntentSuppression` again.
|
||||
- Kept the fixed debug anchor and non-teleport target movement changes for continued testing.
|
||||
|
||||
### Build Status
|
||||
|
||||
✅ **SUCCESS** - Rollback build succeeded and the DLL was installed to the F4SE folder.
|
||||
Reference in New Issue
Block a user