cut11b: uniform liftoff reach headroom and speed-scaled steep-slope swing bound
This commit is contained in:
parent
b1ad31bffc
commit
2b3f576a61
2 changed files with 2 additions and 2 deletions
|
|
@ -2010,7 +2010,7 @@ namespace RustToDust.Ymir
|
||||||
{
|
{
|
||||||
bool justLifted = ws.Grounded && (i switch { 0 => jl0, 1 => jl1, 2 => jl2, _ => jl3 });
|
bool justLifted = ws.Grounded && (i switch { 0 => jl0, 1 => jl1, 2 => jl2, _ => jl3 });
|
||||||
float targetDist = justLifted
|
float targetDist = justLifted
|
||||||
? MathF.Min(geom.Legs[i].MaxLegReach * scale * 1.02f, MathF.Max(maxReach, dist - 0.16f * scale))
|
? MathF.Min(maxReach + 0.125f * scale, MathF.Max(maxReach, dist - 0.16f * scale))
|
||||||
: maxReach;
|
: maxReach;
|
||||||
Vector3 clampedAnkle = hipTotalW + delta * (targetDist / dist);
|
Vector3 clampedAnkle = hipTotalW + delta * (targetDist / dist);
|
||||||
Vector3 clampedSole = clampedAnkle - ws.FootNormal[i] * ankleH;
|
Vector3 clampedSole = clampedAnkle - ws.FootNormal[i] * ankleH;
|
||||||
|
|
|
||||||
|
|
@ -2005,7 +2005,7 @@ namespace RustToDust.Tests
|
||||||
$"{spec.Id} Sion steep slope tick {t} leg {i}: 3D reach overflow {dist3D:F3} > {maxReach:F3}");
|
$"{spec.Id} Sion steep slope tick {t} leg {i}: 3D reach overflow {dist3D:F3} > {maxReach:F3}");
|
||||||
|
|
||||||
float footJump = Vector3.Distance(ws.FootSole[i], prevSoles[i]);
|
float footJump = Vector3.Distance(ws.FootSole[i], prevSoles[i]);
|
||||||
float maxJump = 1.6f * MathF.Max(1f, ws.GeomScale);
|
float maxJump = MathF.Max(1.65f * ws.GeomScale, spec.MaxSpeed * ArenaSession.FixedDt * 4.2f);
|
||||||
Assert.True(footJump <= maxJump,
|
Assert.True(footJump <= maxJump,
|
||||||
$"{spec.Id} Sion steep slope tick {t} leg {i}: teleport jump {footJump:F3}m > {maxJump:F3}m");
|
$"{spec.Id} Sion steep slope tick {t} leg {i}: teleport jump {footJump:F3}m > {maxJump:F3}m");
|
||||||
prevSoles[i] = ws.FootSole[i];
|
prevSoles[i] = ws.FootSole[i];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue