From c0f43aafb1afa9987899db6bd33b7b06d6551521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20B=C3=B6klin?= Date: Sun, 25 Apr 2021 14:56:04 +0200 Subject: [PATCH] Make glider orientation stick to look dir even without input --- common/src/states/glide.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/states/glide.rs b/common/src/states/glide.rs index 5c0ccc1796..b08a86c8c2 100644 --- a/common/src/states/glide.rs +++ b/common/src/states/glide.rs @@ -65,7 +65,7 @@ impl CharacterBehavior for Data { let ori = Some(data.inputs.move_dir) .filter(|mv_dir| !mv_dir.is_approx_zero()) - .or_else(|| self.ori.look_dir().xy().try_normalized()) + .or_else(|| data.inputs.look_dir.xy().try_normalized()) .map(|mv_dir| Vec3::new(mv_dir.x, mv_dir.y, (data.inputs.look_dir.z + 0.3) * 2.0)) .and_then(Dir::from_unnormalized) .and_then(|tgt_dir| {