simplify wheels

This commit is contained in:
Joe Ardent 2023-02-15 14:52:29 -08:00
parent d2961bd448
commit fa59a81f05
3 changed files with 4 additions and 20 deletions

View file

@ -76,7 +76,7 @@ pub(super) fn falling_cat(
{
let now = Instant::now();
if (now - debug_instant.0).as_millis() > 500 {
dbg!(roll_error, pitch_error, &control_vars, mag);
//dbg!(roll_error, pitch_error, &control_vars, mag);
debug_instant.0 = now;
}
}

View file

@ -93,18 +93,8 @@ pub fn spawn_tires(
let revolute_builder = RevoluteJointBuilder::new(Vec3::X);
let axel_joint = MultibodyJoint::new(fork_rb_entity, revolute_builder);
let spatial_bundle = SpatialBundle {
..Default::default()
};
let tire_spundle = SpatialBundle {
..Default::default()
};
commands
.spawn(RigidBody::Dynamic)
.insert(spatial_bundle)
.insert((
wheel_collider,
mass_props,
@ -117,14 +107,8 @@ pub fn spawn_tires(
CyberWheel,
ExternalForce::default(),
Restitution::new(0.2),
SpatialBundle::default(),
))
.with_children(|wheel| {
wheel.spawn(tire_spundle).insert(pbr_bundle.clone()).insert(
TransformInterpolation {
start: None,
end: None,
},
);
});
.insert(pbr_bundle.clone());
}
}

View file

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