From fa3972edfda7d4c45927f9e0fec205312dcc5d98 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 7 Feb 2024 02:39:20 -0800 Subject: [PATCH] delay overflow by 2x --- src/physics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index 5c23ea6..37871f5 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -217,7 +217,7 @@ impl PhysicsCamera { const ANGLE_PITCH_LOWER_LIMIT:Angle32=-Angle32::FRAC_PI_2; const ANGLE_PITCH_UPPER_LIMIT:Angle32=Angle32::FRAC_PI_2; pub fn move_mouse(&mut self,mouse_pos:glam::IVec2){ - let mut unclamped_mouse_pos=self.clamped_mouse_pos+mouse_pos-self.mouse.pos; + let mut unclamped_mouse_pos=mouse_pos-self.mouse.pos+self.clamped_mouse_pos; unclamped_mouse_pos.y=unclamped_mouse_pos.y.clamp( self.sensitivity.y.rhs_div_int(Self::ANGLE_PITCH_LOWER_LIMIT.get() as i64) as i32, self.sensitivity.y.rhs_div_int(Self::ANGLE_PITCH_UPPER_LIMIT.get() as i64) as i32,