diff --git a/src/integer.rs b/src/integer.rs index ad50166..e106b70 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -645,6 +645,12 @@ impl Planar64Vec3{ )>>32) as i64) } #[inline] + pub fn dot128(&self,rhs:Self)->i128{ + (self.0.x as i128)*(rhs.0.x as i128)+ + (self.0.y as i128)*(rhs.0.y as i128)+ + (self.0.z as i128)*(rhs.0.z as i128) + } + #[inline] pub fn cross(&self,rhs:Self)->Planar64Vec3{ Planar64Vec3(glam::i64vec3( (((self.0.y as i128)*(rhs.0.z as i128)-(self.0.z as i128)*(rhs.0.y as i128))>>32) as i64, diff --git a/src/physics.rs b/src/physics.rs index e7ba49d..9239b2b 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -794,9 +794,9 @@ impl TouchingState{ //TODO: trey push solve for contact in &self.contacts{ let n=models.mesh(contact.model_id).face_nd(contact.face_id).0; - let d=n.dot(*velocity); - if d