diff options
| author | Jan Hohenheim <jan@hohenheim.ch> | 2023-02-04 20:15:34 +0100 |
|---|---|---|
| committer | Jan Hohenheim <jan@hohenheim.ch> | 2023-02-04 20:15:34 +0100 |
| commit | 9e89a71257a2d2fa78c2c97449280100f3a94725 (patch) | |
| tree | 8e0db538d593a20aa98ee1f607064e4f09cba023 /src | |
| parent | 52910c9c59f91bd2c37d0608e3cd7269edef1da2 (diff) | |
| download | rapier-9e89a71257a2d2fa78c2c97449280100f3a94725.tar.gz rapier-9e89a71257a2d2fa78c2c97449280100f3a94725.tar.bz2 rapier-9e89a71257a2d2fa78c2c97449280100f3a94725.zip | |
Revert "Optimistically add normalization"
This reverts commit 52910c9c59f91bd2c37d0608e3cd7269edef1da2.
Diffstat (limited to 'src')
| -rw-r--r-- | src/control/character_controller.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |
