Fix: attack animation collapsed the model into the floor (partial Root clip + WDV)

The procedural attack clips key only the Root bone, but the Attack/MeleeSwing states had writeDefaultValues=true -> a partial (Root-only) clip resets every un-keyed bone (Hips/Spine/legs) to Rukhanka defaults (~identity), collapsing the body into the floor (player + enemy). Root carries the mesh-positioning offset (localPos -0.90, identity rot) while Hips/Spine carry the authored orientation. Fix: writeDefaultValues=false on the attack states (leave un-keyed bones in pose, only lean the Root). Patched both controllers + both recipes (PlayerRigTools/EnemyRigTools) so a rebuild can't regress. Rule: partial bone-subset overlay clips => writeDefaultValues=false.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 23:42:44 -07:00
parent 7b3c9cc2a5
commit 1b07a6b07f
4 changed files with 4 additions and 4 deletions
@@ -146,7 +146,7 @@ namespace ProjectM.EditorTools
var attackClipAsset = AssetDatabase.LoadAssetAtPath<AnimationClip>(AttackClip);
var attack = sm.AddState("Attack");
attack.motion = attackClipAsset;
attack.writeDefaultValues = true;
attack.writeDefaultValues = false; // partial (Root-only) clip: MUST be false, else WDV resets every un-keyed bone (Hips/Spine/legs) to identity and the body collapses into the floor
var toAttack = sm.AddAnyStateTransition(attack);
toAttack.hasExitTime = false;