From e33adeadc8dc7780e947a130f8bc8b72f5fb645f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 17 Nov 2023 16:23:48 -0800 Subject: [PATCH] thinking --- src/model_physics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index b4b90e8..70aa286 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -354,12 +354,12 @@ impl MinkowskiMesh<'_>{ MinkowskiVert::VertVert(self.mesh0.farthest_vert(dir),self.mesh1.farthest_vert(-dir)) } pub fn predict_collision_in(&self,relative_body:&crate::physics::Body,time_limit:crate::integer::Time)->Option<(MinkowskiFace,crate::integer::Time)>{ - let mut infinity_body=-relative_body.clone(); + let mut infinity_body=relative_body.clone(); infinity_body.acceleration=Planar64Vec3::ZERO; infinity_body.infinity_dir().map_or(None,|dir|{ - let start_vert=FEV::::Vert(self.farthest_vert(dir)); + let start_vert=FEV::::Vert(self.farthest_vert(-dir)); //crawl in from negative infinity along a tangent line to get the closest fev - match crate::face_crawler::crawl_fev(start_vert,self,&infinity_body,crate::integer::Time::MIN,relative_body.time){ + match crate::face_crawler::crawl_fev(start_vert,self,&infinity_body,crate::integer::Time::MIN,infinity_body.time){ crate::face_crawler::CrawlResult::Miss(fev)=>{ //continue forwards along the body parabola match crate::face_crawler::crawl_fev(fev,self,relative_body,relative_body.time,time_limit){