From edd3ca566a9b006f19022d42ae8417b161f08c79 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 5 Oct 2023 19:43:28 -0700 Subject: [PATCH] forgot camera offset --- src/physics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index 4b4ad17..0b44fa5 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -312,7 +312,7 @@ pub struct PhysicsOutputState{ } impl PhysicsOutputState{ pub fn adjust_mouse(&self,mouse:&MouseState)->(glam::Vec3,glam::Vec2){ - (self.body.extrapolated_position(mouse.time),self.camera.simulate_move_angles(mouse.pos).as_vec2()) + (self.body.extrapolated_position(mouse.time)+self.camera.offset,self.camera.simulate_move_angles(mouse.pos).as_vec2()) } }