From cc58f2351284eade91dff2c466d95510fb98c8a0 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 22 Feb 2024 01:29:02 -0800 Subject: [PATCH] the bug --- src/physics.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index b766fc4..04a0e4b 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -968,8 +968,9 @@ impl PhysicsState { self.move_state.apply_to_body(&mut self.body,&self.touching,&data.models,&data.hitbox_mesh,&self.style,&self.camera,&self.input_state); } fn set_move_state(&mut self,data:&PhysicsData,move_state:MoveState){ - self.apply_enum_and_body(data); self.move_state=move_state; + //this function call reads the above state that was just set + self.apply_enum_and_body(data); } fn cull_velocity(&mut self,data:&PhysicsData,velocity:Planar64Vec3){ //TODO: be more precise about contacts