From 9e89a71257a2d2fa78c2c97449280100f3a94725 Mon Sep 17 00:00:00 2001 From: Jan Hohenheim Date: Sat, 4 Feb 2023 20:15:34 +0100 Subject: Revert "Optimistically add normalization" This reverts commit 52910c9c59f91bd2c37d0608e3cd7269edef1da2. --- src/control/character_controller.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/control') diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index e72e5b3..5467a4a 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -403,7 +403,7 @@ impl KinematicCharacterController { .filter(|rb| rb.is_kinematic()); for m in &manifolds { - let normal = -(character_pos * m.local_n1).normalize(); + let normal = -(character_pos * m.local_n1); if normal.dot(&self.up) >= -1.0e-5 { grounded = true; } @@ -450,7 +450,7 @@ impl KinematicCharacterController { *kinematic_friction_translation - init_kinematic_friction_translation; } else { for m in &manifolds { - let normal = (character_pos * m.local_n1).normalize(); + let normal = character_pos * m.local_n1; if normal.dot(&self.up) <= 1.0e-5 { for contact in &m.points { -- cgit