diff --git a/engine/physics/src/minimum_difference.rs b/engine/physics/src/minimum_difference.rs index 834b71db..0ef37155 100644 --- a/engine/physics/src/minimum_difference.rs +++ b/engine/physics/src/minimum_difference.rs @@ -373,9 +373,14 @@ impl MinimumDifference{ pub fn details(&self,mesh:&MinkowskiMesh,rel_pos:Planar64Vec3)->Details{ match self.expanded{ Expanded::Expanded=>{ + // local norm = direction.unit + // local dist = a:Dot(norm) + // local hits = -dist < radiusP + radiusQ // if testIntersection then // return hits // end + // NOTE: if hits is true, this if statement necessarily evaluates to true. + // i.e. hits implies this statement // if -dist <= exitRadius + radiusP + radiusQ then // local posP, posQ = decompose(-rel_pos, a0, a1, b0, b1, c0, c1) // return hits, -dist - radiusP - radiusQ, @@ -457,9 +462,6 @@ pub fn minimum_difference(mesh:&MinkowskiMesh,rel_pos:Planar64Vec3)->Option