diff --git a/src/camera.rs b/src/camera.rs index 0e28705..521020e 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -429,7 +429,6 @@ pub fn apply_input_to_player( &mut LinearVelocity, &mut ExternalTorque, Option<&actor::PlayerDrivesThis>, - Option<&actor::WantsMaxRotation>, ), (With, Without), >, @@ -458,7 +457,7 @@ pub fn apply_input_to_player( DVec3::splat(0.0) }; - if let Ok((player_entity, player_transform, mut engine, mut v, mut torque, bike, maxrot)) = + if let Ok((player_entity, player_transform, mut engine, mut v, mut torque, bike)) = q_playercam.get_single_mut() { // Handle key input @@ -594,12 +593,10 @@ pub fn apply_input_to_player( } if settings.rotation_stabilizer_active || key_input.pressed(settings.key_stop) { - if maxrot.is_none() { - commands - .entity(player_entity) - .insert(actor::WantsMaxRotation(0.0)); - } - } else if maxrot.is_some() { + commands + .entity(player_entity) + .insert(actor::WantsMaxRotation(0.0)); + } else { commands .entity(player_entity) .remove::();