add density to wheelconf
This commit is contained in:
parent
3d2d413946
commit
757ce02df2
2 changed files with 3 additions and 1 deletions
|
@ -24,6 +24,7 @@ pub struct WheelConfig {
|
||||||
pub radius: f32,
|
pub radius: f32,
|
||||||
pub friction: f32,
|
pub friction: f32,
|
||||||
pub restitution: f32,
|
pub restitution: f32,
|
||||||
|
pub density: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for WheelConfig {
|
impl Default for WheelConfig {
|
||||||
|
@ -38,6 +39,7 @@ impl Default for WheelConfig {
|
||||||
radius: 0.3,
|
radius: 0.3,
|
||||||
friction: 0.9,
|
friction: 0.9,
|
||||||
restitution: 0.8,
|
restitution: 0.8,
|
||||||
|
density: 0.9,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ pub fn spawn_tires(
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let wheel_collider = Collider::ball(wheel_rad);
|
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 damping = conf.damping;
|
||||||
|
|
||||||
let prismatic_axis = if steering.is_some() {
|
let prismatic_axis = if steering.is_some() {
|
||||||
|
|
Loading…
Reference in a new issue