From b1e502cea4ae905d0c9c394deafccb39ff81c165 Mon Sep 17 00:00:00 2001 From: Louis Pearson Date: Tue, 4 Jun 2019 10:13:40 -0600 Subject: [PATCH] Normalize move_dir only if the magnitude is greater than one --- common/src/sys/inputs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/sys/inputs.rs b/common/src/sys/inputs.rs index 97b88c3e2b..a1df384374 100644 --- a/common/src/sys/inputs.rs +++ b/common/src/sys/inputs.rs @@ -90,7 +90,7 @@ impl<'a> System<'a> for Sys { && vel.0.z <= 0.0; let gliding = glides.get(entity).is_some() && vel.0.z < 0.0; - let move_dir = if control.move_dir.magnitude() > 0.0 { + let move_dir = if control.move_dir.magnitude() > 1.0 { control.move_dir.normalized() } else { control.move_dir