From 06d47a0a60c6a973e798b13544a1c8222c2edf5c Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 10 Jun 2021 11:16:18 -0500 Subject: [PATCH] Try to lock angular velocity when not rotating. --- src/navigation.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/navigation.rs b/src/navigation.rs index dd87998..80c4a86 100644 --- a/src/navigation.rs +++ b/src/navigation.rs @@ -108,7 +108,11 @@ fn movement_controls( } if input.active(rotate_right) { position.position.rotation *= UnitComplex::new(-delta); + } else { + velocity.angvel = 0.; } + } else { + velocity.angvel = 0.; } if direction.length_squared() != 0. { commands.entity(entity).remove::();