pub struct VehicleAntiRollBar { /* private fields */ }Expand description
An anti-roll bar between two wheels (Jolt VehicleAntiRollBar): pushes the less compressed
suspension down when the other is compressed more.
Implementations§
Source§impl VehicleAntiRollBar
impl VehicleAntiRollBar
Sourcepub const MAX_STIFFNESS: f32
pub const MAX_STIFFNESS: f32
Largest anti-roll bar stiffness, N/m: about 2.5e11.
Each step Jolt computes stiffness · suspension length difference · dt
(VehicleConstraint::OnStep) and uses it as the velocity bias of both wheels’
suspension constraints, which the constraint’s effective mass turns into an impulse.
With a length difference of at most limits::MAX_SHAPE_EXTENT this bound keeps the
bias at most about 5e14 for dt <= 1, so the velocity change it gives stays finite;
see docs/limits.md#anti-roll-bars.
Sourcepub fn new(left_wheel: u32, right_wheel: u32) -> Self
pub fn new(left_wheel: u32, right_wheel: u32) -> Self
A bar between two different wheels, by index.
Sourcepub fn stiffness(self, value: f32) -> Self
pub fn stiffness(self, value: f32) -> Self
Spring constant, N/m, between 0 and MAX_STIFFNESS; 0 disables
the bar. Default 1000.