diff --git a/strafe-client/src/model_physics.rs b/strafe-client/src/model_physics.rs index 1d3f307..bb50252 100644 --- a/strafe-client/src/model_physics.rs +++ b/strafe-client/src/model_physics.rs @@ -704,6 +704,20 @@ impl MinkowskiMesh<'_>{ }, } } + // TODO: fundamentally improve this algorithm. + // All it needs to do is find the closest point on the mesh + // and return the FEV which the point resides on. + // + // What it actually does is use the above functions to trace a ray in from infinity, + // crawling the closest point along the mesh surface until the ray reaches + // the starting point to discover the final FEV. + // + // The actual collision prediction probably does a single test + // and then immediately returns with 0 FEV transitions on average, + // because of the strict time_limit constraint. + // + // Most of the calculation time is just calculating the starting point + // for the "actual" crawling algorithm below (predict_collision_{in|out}). fn closest_fev_not_inside(&self,mut infinity_body:Body)->Option>{ infinity_body.infinity_dir().map_or(None,|dir|{ let infinity_fev=self.infinity_fev(-dir,infinity_body.position);