add density to wheelconf

This commit is contained in:
Joe Ardent 2023-02-18 21:57:06 -08:00
parent 3d2d413946
commit 757ce02df2
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,7 @@ pub struct WheelConfig {
pub radius: f32,
pub friction: f32,
pub restitution: f32,
pub density: f32,
}
impl Default for WheelConfig {
@ -38,6 +39,7 @@ impl Default for WheelConfig {
radius: 0.3,
friction: 0.9,
restitution: 0.8,
density: 0.9,
}
}
}

View File

@ -75,7 +75,7 @@ pub fn spawn_tires(
..Default::default()
};
let wheel_collider = Collider::ball(wheel_rad);
let mass_props = ColliderMassProperties::Density(0.1);
let mass_props = ColliderMassProperties::Density(conf.density);
let damping = conf.damping;
let prismatic_axis = if steering.is_some() {