cut11b: preserve 0.21s step cadence on quads and bound liftoff reach ceiling
This commit is contained in:
parent
133e534786
commit
b1ad31bffc
1 changed files with 5 additions and 4 deletions
|
|
@ -1484,9 +1484,10 @@ namespace RustToDust.Ymir
|
|||
|
||||
// Early step-completion break if a planted leg reaches > effectiveBreakFrac * MaxLegReach
|
||||
bool earlyBreak = false;
|
||||
float firstIdleRatio = n == 4 ? 0.36f : 0.68f;
|
||||
float steadyBreakRatio = n == 4 ? 0.56f : 0.90f;
|
||||
float minBreakTime = Math.Clamp(minDur * (ws.FirstStepFromIdle ? firstIdleRatio : steadyBreakRatio), 0.075f, 0.22f);
|
||||
float firstIdleRatio = n == 4 ? 0.38f : 0.68f;
|
||||
float minBreakTime = ws.FirstStepFromIdle
|
||||
? Math.Clamp(minDur * firstIdleRatio, 0.075f, 0.15f)
|
||||
: Math.Clamp(minDur * (n == 4 ? 0.69f : 0.90f), 0.205f, 0.22f);
|
||||
if (ws.SwingTime >= minBreakTime && ws.SwingPhase > overlap + 0.15f)
|
||||
{
|
||||
Vector3 curPelvisShift = Vector3.Transform(ws.PelvisOffset, qYaw);
|
||||
|
|
@ -2009,7 +2010,7 @@ namespace RustToDust.Ymir
|
|||
{
|
||||
bool justLifted = ws.Grounded && (i switch { 0 => jl0, 1 => jl1, 2 => jl2, _ => jl3 });
|
||||
float targetDist = justLifted
|
||||
? MathF.Max(maxReach, dist - 0.16f * scale)
|
||||
? MathF.Min(geom.Legs[i].MaxLegReach * scale * 1.02f, MathF.Max(maxReach, dist - 0.16f * scale))
|
||||
: maxReach;
|
||||
Vector3 clampedAnkle = hipTotalW + delta * (targetDist / dist);
|
||||
Vector3 clampedSole = clampedAnkle - ws.FootNormal[i] * ankleH;
|
||||
|
|
|
|||
Loading…
Reference in a new issue