Clambering: capsule hips (Nimso), footprint takes the edge while pressing, knee-up memory

The box pelvis caught on ledge lips; a sideways capsule rides over. While clambering
(pressing, just pressed, legs tucked) the stance footprint may take higher ground the hips
are only partly over. Spike measures the free hand's error while climbing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
FoxyzandClaude Opus 5.5 committed 2026-10-02 20:26:22 +03:00
1 parent 0bddcf4517
commit 83186f9676
2 files changed
+39 -10

No files matched your search

+15
View File
@@ -1142,6 +1142,15 @@ public partial class RagdollSpike : Node3D
}
if (t > 1f)
_climbEyeErr = Mathf.Max(_climbEyeErr, _ragdoll.Eye.DistanceTo(Camera.Origin));
// The free hand reaching for the next hold while hanging on the other (tipped body): it
// should stay on its controller (owner: "tracking off when the body is tilted").
for (int side = 0; side < 2; side++)
if (_climbWeld[side] == null && _climbStep is 2 or 3 && _ragdoll.Hand(side).GetContactCount() == 0)
{
Vector3 ctrl = (side == 0 ? Left : Right).Origin;
_climbFreeErr += _ragdoll.Hand(side).GlobalPosition.DistanceTo(ctrl);
_climbFreeN++;
}
void Next(int step)
{
@@ -1158,9 +1167,15 @@ public partial class RagdollSpike : Node3D
}
}
private float _climbFreeErr;
private int _climbFreeN;
private bool FinishClimbWall()
{
float rise = _ragdoll.Pelvis.GlobalPosition.Y - _climbStartPelvis;
GD.Print($"RAGDOLL: wall climb: free hand vs its controller while reaching {(_climbFreeN > 0 ? _climbFreeErr / _climbFreeN : 0f):F3} m mean");
_climbFreeErr = 0f;
_climbFreeN = 0;
GD.Print($"RAGDOLL: wall climb: reached step {_climbStep}/5, pelvis rose {rise:F3} m (> 0.35), holding {_climbWeld[0] != null}/{_climbWeld[1] != null}, eye vs camera max {_climbEyeErr:F3} (< {PlayerRagdoll.MaxViewLead + 0.03f:F2}), snaps {NewSnaps}");
Grip(0, false);
Grip(1, false);