Use authoritative FO4 animation variable names
Replace previously guessed graph variable names/types with the real FO4 humanoid movement behavior names (from MTBehavior.hkx) and update syncing logic accordingly. F4AnimationDescriptor now lists only the variables F4T drives (Speed, SpeedSmoothed, IsSprinting, bInJumpState, iIsInSneak) to avoid clobbering graph state; Direction is intentionally not written. Enable proxy sneak sync using the INT32 iIsInSneak, change SpeedSampled -> SpeedSmoothed, and update all Set/Get calls and diagnostic logging to the new names. Fix jump detection by relying on the actor IsJumping() API (removing the noisy vertical-speed heuristic that produced false positives and caused proxies to remain in jump state). Changes touch descriptor, proxy sync, puppet, main logic, and related docs to explain the rationale and testing notes.
This commit is contained in:
@@ -14,18 +14,22 @@ namespace RE
|
||||
|
||||
namespace F4T::ProxyAnimationSync
|
||||
{
|
||||
// Confirmed via local read-by-name graph debug (Fallout4Together.log):
|
||||
// - float "Speed" reads/writes while in-game (walk ~47-105)
|
||||
// - bool "IsSprinting" reads while in-game
|
||||
// - bIsMoving, bIsSneaking, bSprint, bInJumpState, bWeaponDrawn, Direction: unavailable by name
|
||||
// Authoritative FO4 humanoid movement-behavior graph variable names, taken from
|
||||
// MTBehavior.hkx (hkbBehaviorGraphStringData::variableNames, with types from the
|
||||
// parallel variableInfos array) via the F4-Animation-Research unpack:
|
||||
// Speed, SpeedSmoothed, Direction -> VARIABLE_TYPE_REAL (float)
|
||||
// IsSprinting, bInJumpState -> VARIABLE_TYPE_BOOL (bool)
|
||||
// iIsInSneak -> VARIABLE_TYPE_INT32 (int)
|
||||
// Earlier code guessed names like "speed"/"speedSampled"/"direction" that do not exist
|
||||
// on this graph, so every SetGraphVariable* call silently failed.
|
||||
namespace GraphVar
|
||||
{
|
||||
inline constexpr const char* kSpeed = "Speed";
|
||||
inline constexpr const char* kSpeedLower = "speed";
|
||||
inline constexpr const char* kSpeedSampled = "speedSampled";
|
||||
inline constexpr const char* kSpeedDamped = "speedDamped";
|
||||
inline constexpr const char* kSpeedSmoothed = "SpeedSmoothed";
|
||||
inline constexpr const char* kDirection = "Direction";
|
||||
inline constexpr const char* kIsSprinting = "IsSprinting";
|
||||
inline constexpr const char* kInJumpState = "bInJumpState";
|
||||
inline constexpr const char* kIsInSneak = "iIsInSneak";
|
||||
}
|
||||
|
||||
// Maps network movementSpeed (units/sec) to graph Speed (~0-105). Used when the sender
|
||||
|
||||
Reference in New Issue
Block a user