Arms playtest-1 fixes: open-loop torso lean (chest hunting), hand-driven elbow pole + height cap, held-prop arm collision exceptions

- Lean computed from PhysicsTorso.NominalTarget/TargetBasis, not the body's own shoulders:
  the closed loop made the chest hunt (spike: |v| 1.1 -> 0.019 m/s, lean range 2.7 cm -> 0.9 mm)
- Elbow on its IK circle, 75% hand-axis (forearm continues behind the wrist), bounded-rate
  rotation smoothing (no flips), capped at max(shoulder, wrist) + 5 cm
- PhysicsArms.SetHeld: held prop ignores that side's arm segments (PropGrabber calls it)
- ArmSpike: stretch settle, hug elbows out (0.17 m vs 0.02 m old pole), held-anvil stability;
  all six spikes PASS x3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FoxyzandClaude Opus 5.5 committed 2026-10-02 00:25:50 +03:00
1 parent 7589b13aba
commit 464cda2f71
6 files changed
+288 -65

No files matched your search

+6 -1
View File
@@ -42,6 +42,10 @@ public partial class PhysicsTorso : Node
public RigidBody3D Body => _body;
public Basis TorsoBasis => _body != null ? _body.GlobalTransform.Basis : _torsoBasis;
public Vector3 TargetPosition { get; private set; }
// Head-derived chest target WITHOUT ReachOffset, and its yaw basis — the open-loop frame
// PhysicsArms computes the lean from (reading the body pose instead made the lean hunt).
public Vector3 NominalTarget { get; private set; }
public Basis TargetBasis => _torsoBasis;
public override void _Ready()
{
@@ -83,7 +87,8 @@ public partial class PhysicsTorso : Node
_yawBasis = FlatYawBasis(head.GlobalTransform.Basis);
Vector3 headPos = head.GlobalPosition - _yawBasis * Vector3.Forward * HeadBackOffset;
UpdateTorsoYaw(headPos, dt);
Vector3 target = headPos + _torsoBasis * new Vector3(0f, -TorsoDrop, TorsoBackOffset) + ReachOffset;
NominalTarget = headPos + _torsoBasis * new Vector3(0f, -TorsoDrop, TorsoBackOffset);
Vector3 target = NominalTarget + ReachOffset;
TargetPosition = target;
if (!_arrived && _body.GlobalPosition.DistanceTo(target) < 0.3f)