From e79661b7db987d649044054fc8fd36d063ddc0d6 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Wed, 25 Jan 2023 17:39:32 -0800 Subject: [PATCH] tweakity-tweak --- src/bike.rs | 4 ++-- src/input.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bike.rs b/src/bike.rs index 7425e57..373462b 100644 --- a/src/bike.rs +++ b/src/bike.rs @@ -58,7 +58,7 @@ impl Default for WheelConfig { rear_back: 1.1, y: -1.5, limits: [-1.0, 1.0], - stiffness: 20.0, + stiffness: 100.0, damping: 1.0, radius: 0.3, } @@ -236,7 +236,7 @@ fn spawn_tires( let wheel_collider = Collider::ball(wheel_rad); let mass_props = ColliderMassProperties::Density(0.001); - let damping = 0.3; + let damping = conf.damping; let prismatic = PrismaticJointBuilder::new(Vec3::Y) .local_anchor1(offset) .limits(limits) diff --git a/src/input.rs b/src/input.rs index 97346e5..6f614fb 100644 --- a/src/input.rs +++ b/src/input.rs @@ -37,8 +37,9 @@ fn update_debug_cam(mut offset: ResMut, mut keys: ResMut 0 { + let unpressed = keys.just_released(KeyCode::LShift) || keys.just_released(KeyCode::RShift); keys.reset_all(); - if shifted { + if shifted && !unpressed { keys.press(KeyCode::LShift); } }