From 481a37e0f49d4cdc70b18b580eba1bff0251e611 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 21 Nov 2023 20:28:24 -0800 Subject: [PATCH] debug --- src/physics.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index 4b710ff..efd5a1f 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -956,6 +956,7 @@ impl TouchingState{ //detect model collision in reverse let model_mesh=models.mesh(intersect.model_id); let minkowski=crate::model_physics::MinkowskiMesh::minkowski_sum(&model_mesh,&style_mesh); + println!("### predict_collision_out id={} body={} time_limit={}",intersect.model_id,relative_body,collector.time()); collector.collect(minkowski.predict_collision_out(&relative_body,collector.time()).map(|(face,time)|{ TimedInstruction{ time, @@ -1295,6 +1296,7 @@ impl crate::instruction::InstructionEmitter for PhysicsState //no checks are needed because of the time limits. let model_mesh=self.models.mesh(id); let minkowski=crate::model_physics::MinkowskiMesh::minkowski_sum(&model_mesh,&style_mesh); + println!("### predict_collision_in id={} body={} time_limit={}",id,relative_body,collector.time()); collector.collect(minkowski.predict_collision_in(&relative_body,collector.time()) //temp (?) code to avoid collision loops .map_or(None,|(face,time)|if time==self.time{None}else{Some((face,time))}) @@ -1916,4 +1918,4 @@ fn already_inside_hit_nothing(){ Planar64Vec3::int(0,1,0), Time::ZERO ),None); -} \ No newline at end of file +}