diff options
| author | Jan Hohenheim <jan@hohenheim.ch> | 2023-02-04 20:27:27 +0100 |
|---|---|---|
| committer | Jan Hohenheim <jan@hohenheim.ch> | 2023-02-04 20:27:27 +0100 |
| commit | 39998e96e8f887afdf79c02c7873d7c70bf1530c (patch) | |
| tree | 13d123c36cdae69e9e2285d8488dbe26ecf37fb4 /src/control | |
| parent | 9e89a71257a2d2fa78c2c97449280100f3a94725 (diff) | |
| download | rapier-39998e96e8f887afdf79c02c7873d7c70bf1530c.tar.gz rapier-39998e96e8f887afdf79c02c7873d7c70bf1530c.tar.bz2 rapier-39998e96e8f887afdf79c02c7873d7c70bf1530c.zip | |
Fix grounded false positives when normal is [0, 0]
Diffstat (limited to 'src/control')
| -rw-r--r-- | src/control/character_controller.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 5467a4a..49373d1 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -404,7 +404,7 @@ impl KinematicCharacterController { for m in &manifolds { let normal = -(character_pos * m.local_n1); - if normal.dot(&self.up) >= -1.0e-5 { + if normal.dot(&self.up) >= 1.0e-5 { grounded = true; } |
