Body step 2: the player is a muscle-driven ragdoll (Project TX)
PlayerRagdoll: 9 bodies, spine/neck ball joints, shoulder drives (girdle + muscle), elbow hinges, torque-capped motor PDs toward the True Body, chest->hand guides, implicit balance motor, mass-scaled ground control. PlayerRig: XR driver with stick move / snap turn and Bonelab-style push-back (eye->camera sphere sweep). Replaces the chase bodies in main.tscn; RagdollSpike regression (14 phases). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d0b50fbc41
commit
d83273dd2f
16 files changed
+1487
-28
No files matched your search
@@ -20,6 +20,9 @@ public sealed class ArmSolver
|
||||
|
||||
public Vector3 Elbow { get; private set; }
|
||||
public Vector3 Wrist { get; private set; }
|
||||
// Unit vector from the arm axis toward the elbow (defined even for a straight arm); the
|
||||
// elbow hinge axis is Pole × (shoulder→wrist).
|
||||
public Vector3 Pole { get; private set; } = Vector3.Back;
|
||||
|
||||
// side = the arm's outward direction (−torso X for the left arm, +X for the right).
|
||||
// handBasis = the controller's basis (null → torso-frame reference only).
|
||||
@@ -78,7 +81,8 @@ public sealed class ArmSolver
|
||||
_poleAngle += Mathf.Clamp(step, -PoleMaxSpeed * delta, PoleMaxSpeed * delta);
|
||||
Vector3 pole = refN.Rotated(dir, _poleAngle);
|
||||
|
||||
Elbow = center + CapElbowHeight(pole, dir, center, radius, Mathf.Max(shoulder.Y, wrist.Y) + ElbowRiseAllowance) * radius;
|
||||
Pole = CapElbowHeight(pole, dir, center, radius, Mathf.Max(shoulder.Y, wrist.Y) + ElbowRiseAllowance);
|
||||
Elbow = center + Pole * radius;
|
||||
Wrist = Elbow + (wrist - Elbow).Normalized() * foreLen;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user