From 65ba54f2f5fc21b004dee525b4e18ce6dc70ff88 Mon Sep 17 00:00:00 2001 From: shadow cat Date: Wed, 5 Jun 2024 00:32:25 -0400 Subject: [PATCH] fix camera normalization v2 --- src/client/handle_input.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/handle_input.rs b/src/client/handle_input.rs index d010450..d62b243 100644 --- a/src/client/handle_input.rs +++ b/src/client/handle_input.rs @@ -44,9 +44,6 @@ impl Client<'_> { (delta.y * 0.003).clamp(-PI, PI), ) * state.camera.orientation; } - if delta.x != 0.0 || delta.y != 0.0 { - state.camera.orientation.renormalize(); - } } let rot_dist = 1.0 * dt; if input.pressed(Key::KeyQ) { @@ -59,6 +56,7 @@ impl Client<'_> { Rotation3::from_axis_angle(&state.camera.forward(), -rot_dist) * state.camera.orientation; } + state.camera.orientation.renormalize(); if input.scroll_delta != 0.0 { state.camera_scroll += input.scroll_delta; state.camera.scale = (state.camera_scroll * 0.2).exp();