cut11b: match arachnid knee/hip actuator phase and restore stride envelope
This commit is contained in:
parent
21a596e471
commit
dc1df6041c
1 changed files with 8 additions and 8 deletions
|
|
@ -1708,7 +1708,7 @@ namespace RustToDust.Ymir
|
||||||
float restRadial = MathF.Sqrt(rdx * rdx + rdz * rdz) * scale;
|
float restRadial = MathF.Sqrt(rdx * rdx + rdz * rdz) * scale;
|
||||||
if (restRadial > 0.25f * scale)
|
if (restRadial > 0.25f * scale)
|
||||||
{
|
{
|
||||||
maxStep = MathF.Min(maxStep, restRadial * 0.92f);
|
maxStep = MathF.Min(maxStep, restRadial * 0.90f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (stepOffset.Length() > maxStep)
|
if (stepOffset.Length() > maxStep)
|
||||||
|
|
@ -2040,10 +2040,10 @@ namespace RustToDust.Ymir
|
||||||
|
|
||||||
float subDt = dt * 0.25f;
|
float subDt = dt * 0.25f;
|
||||||
float limbI = MathF.Max(1f, mass * scale * scale * 0.025f);
|
float limbI = MathF.Max(1f, mass * scale * scale * 0.025f);
|
||||||
float kpStance = limbI * (n == 4 ? 5200f : 5600f);
|
float kpStance = limbI * (n == 4 ? 4600f : 5600f);
|
||||||
float kpSwing = limbI * (n == 4 ? 4600f : 4400f);
|
float kpSwing = limbI * (n == 4 ? 3600f : 4400f);
|
||||||
float kdStance = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 5200f : 5600f));
|
float kdStance = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 4600f : 5600f));
|
||||||
float kdSwing = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 4600f : 4400f));
|
float kdSwing = limbI * (2f * 0.85f * MathF.Sqrt(n == 4 ? 3600f : 4400f));
|
||||||
float tauLimitBase = limbI * 700f;
|
float tauLimitBase = limbI * 700f;
|
||||||
float tauLimitAnkle = limbI * 650f;
|
float tauLimitAnkle = limbI * 650f;
|
||||||
|
|
||||||
|
|
@ -2062,9 +2062,9 @@ namespace RustToDust.Ymir
|
||||||
float tauMax = tauLimitBase * legIntegrities[i];
|
float tauMax = tauLimitBase * legIntegrities[i];
|
||||||
float tauAnkleMax = tauLimitAnkle * 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
|
// 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 kpKnee = geom.IsArachnidUp ? kp * 1.25f : kp;
|
||||||
float kdKnee = geom.IsArachnidUp ? kd * 1.36f : kd;
|
float kdKnee = geom.IsArachnidUp ? kd * 1.12f : kd;
|
||||||
float tauKnee = geom.IsArachnidUp ? tauMax * 2.4f : tauMax;
|
float tauKnee = geom.IsArachnidUp ? tauMax * 1.25f : tauMax;
|
||||||
|
|
||||||
ref var act = ref ws.Actuators[i];
|
ref var act = ref ws.Actuators[i];
|
||||||
for (int sub = 0; sub < 4; sub++)
|
for (int sub = 0; sub < 4; sub++)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue