Stop adding spring lift above gravity when upward vel.Y > 3.5 m/s on crests
This commit is contained in:
parent
310fa880a5
commit
9db68c2c8a
1 changed files with 2 additions and 2 deletions
|
|
@ -664,8 +664,8 @@ namespace RustToDust.Ymir
|
||||||
supportForce += supportDir * fCenter;
|
supportForce += supportDir * fCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cap total spring + bump-stop vertical acceleration at <= 65 m/s^2 so ridge impacts never catapult vehicles skyward
|
// Cap total spring + bump-stop vertical acceleration at <= 65 m/s^2 (and stop adding upward lift once vel.Y > 3.5 m/s)
|
||||||
float maxSpringY = mass * 65f;
|
float maxSpringY = vel.Y > 3.5f ? mass * 20f : mass * 65f;
|
||||||
if (supportForce.Y > maxSpringY && supportForce.Y > 1e-4f)
|
if (supportForce.Y > maxSpringY && supportForce.Y > 1e-4f)
|
||||||
{
|
{
|
||||||
supportForce *= maxSpringY / supportForce.Y;
|
supportForce *= maxSpringY / supportForce.Y;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue