Normalize move_dir only if the magnitude is greater than one

This commit is contained in:
Louis Pearson 2019-06-04 10:13:40 -06:00
parent 52764376ae
commit 84ac965240

View File

@ -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