From 3cc006d3fbb0528909131c8052a0dc0568d6931f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 23 Nov 2023 18:46:09 -0800 Subject: [PATCH] normalize your normals broh --- src/model_physics.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/model_physics.rs b/src/model_physics.rs index 3380e6f..5d37fc7 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -580,17 +580,20 @@ impl MeshQuery for MinkowskiM let mut best_edge=None; let mut best_d=Planar64::ZERO; let edge_face1_n=self.mesh1.face_nd(edge_face_id1).0; + let edge_face1_nn=edge_face1_n.dot(edge_face1_n); for &directed_edge_id0 in v0e.iter(){ let edge0_n=self.mesh0.directed_edge_n(directed_edge_id0); + let edge0_nn=edge0_n.dot(edge0_n); let d=edge_face1_n.dot(edge0_n); - if d for MinkowskiM let mut best_edge=None; let mut best_d=Planar64::ZERO; let edge_face0_n=self.mesh0.face_nd(edge_face_id0).0; + let edge_face0_nn=edge_face0_n.dot(edge_face0_n); for &directed_edge_id1 in v1e.iter(){ let edge1_n=self.mesh1.directed_edge_n(directed_edge_id1); + let edge1_nn=edge1_n.dot(edge1_n); let d=edge_face0_n.dot(edge1_n); - if d