five-on-it / packages/sim/src/vehicle-classes / ROLL_STEADY
Variable: ROLL_STEADY
constROLL_STEADY:object
Defined in: packages/sim/src/vehicle-classes.ts:218
What holds a four-wheeler on its wheels when it is hit from the side (decided 2026-10-12: only a hard ram tips a car): a spring and a damper on the roll angle while a wheel is down and it leans less than maxAngle, its torque capped at maxAcceleration (rad/s²) about the forward axis. A T-bone at a coast shoves the car aside; a ram at full throttle pushes harder than the cap and tips it onto its side, the damper keeping it from going on over onto its roof. The two-wheelers have their own, stiffer spring.
Type Declaration
damping
damping:
number=0.5
Its damping ratio.
frequency
frequency:
number=6
The spring's natural frequency (rad/s).
maxAcceleration
maxAcceleration:
number=20
The most it turns the car back (rad/s²).
maxAngle
maxAngle:
number=1.05
Beyond this lean (rad) it lets go: the car is on its side.
sideDamping
sideDamping:
number=4
Past it, until upside down, only a damper on the roll rate (1/s): it comes to rest on its side.