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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user