pub struct VehicleTrackSettings { /* private fields */ }Expand description
One track of a tracked vehicle (Jolt VehicleTrackSettings): the wheels it runs over and
how the drivetrain turns it. The defaults are Jolt’s.
Implementations§
Source§impl VehicleTrackSettings
impl VehicleTrackSettings
Sourcepub fn new(wheels: Vec<TrackedWheelSettings>, driven_wheel: u32) -> Self
pub fn new(wheels: Vec<TrackedWheelSettings>, driven_wheel: u32) -> Self
A track over wheels (at least one), driven by the engine at driven_wheel, an index
into wheels. The track’s speed is the driven wheel’s: every other wheel turns at the
track speed over its own radius, so every radius must be within a factor
limits::MAX_RATIO of the driven wheel’s.
Sourcepub fn inertia(self, value: f32) -> Self
pub fn inertia(self, value: f32) -> Self
Moment of inertia of the track and its wheels about the driven wheel’s axle, kg·m², within
limits::MIN_TRACK_INERTIA..=limits::MAX_TRACK_INERTIA and within a factor
limits::MAX_TRACK_INERTIA_RATIO of the other track’s; the chassis bounds it too
(limits::MAX_TRACK_MASS_RATIO). Default 10.
Sourcepub fn angular_damping(self, value: f32) -> Self
pub fn angular_damping(self, value: f32) -> Self
Angular damping of the track, dω/dt = −c·ω, not negative. Default 0.5.
Sourcepub fn max_brake_torque(self, value: f32) -> Self
pub fn max_brake_torque(self, value: f32) -> Self
Largest brake torque on the track, N·m, not negative. Default 15000.
Sourcepub fn differential_ratio(self, value: f32) -> Self
pub fn differential_ratio(self, value: f32) -> Self
Ratio between the gearbox and the driven wheel’s rotation rates, positive. Default 6.