diff --git a/src/physics.rs b/src/physics.rs index 0d56b0e..d13f6a1 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1195,16 +1195,7 @@ impl crate::instruction::InstructionConsumer for PhysicsStat self.touching.constrain_acceleration(&self.models,&mut a); self.body.acceleration=a; //check ground - //self.touching.get_move_state(); - match &c.face { - TreyMeshFace::Top => { - //TODO: make this more advanced checking contacts - self.move_state=MoveState::Air; - }, - _=>if let Some(a)=self.refresh_walk_target(){ - self.body.acceleration=a; - }, - } + self.move_state=self.touching.get_move_state(); }, PhysicsCollisionAttributes::Intersect{intersecting: _,general: _}=>{ self.touching.remove(&c);