increase friction coefficients to more realistic values

This commit is contained in:
Joe Ardent 2023-02-19 14:31:20 -08:00
parent c8358488c2
commit 0f330283ee
4 changed files with 4 additions and 5 deletions

View file

@ -16,7 +16,7 @@ pub(super) fn spawn_cyberbike(
wheel_conf: Res<WheelConfig>, wheel_conf: Res<WheelConfig>,
mut meshterials: Meshterial, mut meshterials: Meshterial,
) { ) {
let altitude = PLANET_RADIUS - 100.0; let altitude = PLANET_RADIUS - 180.0;
let mut xform = Transform::from_translation(Vec3::X * altitude) let mut xform = Transform::from_translation(Vec3::X * altitude)
.with_rotation(Quat::from_axis_angle(Vec3::Z, -89.0f32.to_radians())); .with_rotation(Quat::from_axis_angle(Vec3::Z, -89.0f32.to_radians()));
@ -81,5 +81,5 @@ pub(super) fn spawn_cyberbike(
.insert(CatControllerState::default()) .insert(CatControllerState::default())
.id(); .id();
spawn_tires(&mut commands, &xform, bike, &wheel_conf, &mut meshterials); spawn_tires(&mut commands, bike, &wheel_conf, &mut meshterials);
} }

View file

@ -37,7 +37,7 @@ impl Default for WheelConfig {
stiffness: 90.0, stiffness: 90.0,
damping: 8.0, damping: 8.0,
radius: 0.3, radius: 0.3,
friction: 0.9, friction: 1.2,
restitution: 0.8, restitution: 0.8,
density: 0.9, density: 0.9,
} }

View file

@ -9,7 +9,6 @@ use super::{CyberSteering, CyberWheel, Meshterial, WheelConfig, BIKE_WHEEL_COLLI
pub fn spawn_tires( pub fn spawn_tires(
commands: &mut Commands, commands: &mut Commands,
_xform: &Transform,
bike: Entity, bike: Entity,
conf: &WheelConfig, conf: &WheelConfig,
meshterials: &mut Meshterial, meshterials: &mut Meshterial,

View file

@ -32,7 +32,7 @@ fn spawn_planet(
let pcollide = ( let pcollide = (
shape, shape,
Friction { Friction {
coefficient: 0.8, coefficient: 1.2,
..Default::default() ..Default::default()
}, },
Restitution::new(0.8), Restitution::new(0.8),