From 4af4dc669bc8ab55f40d22750c8cea4bacf58c7b Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 9 Nov 2023 15:06:31 -0800 Subject: [PATCH] update move state if acceleration culls surface --- src/physics.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index 001f9fb..1a0a25e 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1523,7 +1523,9 @@ impl crate::instruction::InstructionConsumer for PhysicsStat if let Some(rocket_force)=self.style.rocket_force{ a+=self.style.get_propulsion_control_dir(&self.camera,self.controls,&self.next_mouse,self.time)*rocket_force; } - set_acceleration_cull(&mut self.body,&mut self.touching,&self.models,a); + if set_acceleration_cull(&mut self.body,&mut self.touching,&self.models,a){ + (self.move_state,self.body.acceleration)=self.touching.get_move_state(&self.body,&self.models,&self.style,&self.camera,self.controls,&self.next_mouse,self.time); + } } }, }