mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Normalize move_dir only if the magnitude is greater than one
This commit is contained in:
parent
52764376ae
commit
84ac965240
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user