diff --git a/src/body.rs b/src/body.rs index dec612e..24fdeca 100644 --- a/src/body.rs +++ b/src/body.rs @@ -54,6 +54,7 @@ impl PhysicsState { if applied_friction*applied_friction Option { + //check if you are accelerating towards a walk target velocity and create an event + return None; + } } impl crate::event::EventTrait for PhysicsState { @@ -96,9 +102,13 @@ impl crate::event::EventTrait for PhysicsState { //check for collision start events (against every part in the game with no optimization!!) for &model in self.world.models { best.collect(self.predict_collision(&model)); + if self.grounded { + //walk maintenance + best.collect(self.next_walk_event()); + }else{ + //check to see when the next strafe tick is + best.collect(self.next_strafe_event()); } - //check to see when the next strafe tick is - best.collect(self.next_strafe_event()); best.event() } }