From dc1df6041c405df20434eed954433dfd6d1af7f3 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 6 Dec 2026 03:22:44 +0100 Subject: [PATCH] cut11b: match arachnid knee/hip actuator phase and restore stride envelope --- src/RustToDust.Ymir/WalkerLocomotion.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/RustToDust.Ymir/WalkerLocomotion.cs b/src/RustToDust.Ymir/WalkerLocomotion.cs index 15c566a..bec35f7 100644 --- a/src/RustToDust.Ymir/WalkerLocomotion.cs +++ b/src/RustToDust.Ymir/WalkerLocomotion.cs @@ -1708,7 +1708,7 @@ namespace RustToDust.Ymir float restRadial = MathF.Sqrt(rdx * rdx + rdz * rdz) * scale; if (restRadial > 0.25f * scale) { - maxStep = MathF.Min(maxStep, restRadial * 0.92f); + maxStep = MathF.Min(maxStep, restRadial * 0.90f); } } if (stepOffset.Length() > maxStep) @@ -2040,10 +2040,10 @@ namespace RustToDust.Ymir float subDt = dt * 0.25f; float limbI = MathF.Max(1f, mass * scale * scale * 0.025f); - float kpStance = limbI * (n == 4 ? 5200f : 5600f); - float kpSwing = limbI * (n == 4 ? 4600f : 4400f); - float kdStance = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 5200f : 5600f)); - float kdSwing = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 4600f : 4400f)); + float kpStance = limbI * (n == 4 ? 4600f : 5600f); + float kpSwing = limbI * (n == 4 ? 3600f : 4400f); + float kdStance = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 4600f : 5600f)); + float kdSwing = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 3600f : 4400f)); float tauLimitBase = limbI * 700f; float tauLimitAnkle = limbI * 650f; @@ -2062,9 +2062,9 @@ namespace RustToDust.Ymir float tauMax = tauLimitBase * legIntegrities[i]; float tauAnkleMax = tauLimitAnkle * legIntegrities[i]; // Arachnid-up KneeFlex rotates 2x HipPitch (2*alpha vs alpha) during rapid extension; track cleanly so shin does not plunge - float kpKnee = geom.IsArachnidUp ? kp * 1.85f : kp; - float kdKnee = geom.IsArachnidUp ? kd * 1.36f : kd; - float tauKnee = geom.IsArachnidUp ? tauMax * 2.4f : tauMax; + float kpKnee = geom.IsArachnidUp ? kp * 1.25f : kp; + float kdKnee = geom.IsArachnidUp ? kd * 1.12f : kd; + float tauKnee = geom.IsArachnidUp ? tauMax * 1.25f : tauMax; ref var act = ref ws.Actuators[i]; for (int sub = 0; sub < 4; sub++)