aboutsummaryrefslogtreecommitdiff
path: root/src/control/character_controller.rs
diff options
context:
space:
mode:
authorJan Hohenheim <jan@hohenheim.ch>2023-02-04 20:27:27 +0100
committerJan Hohenheim <jan@hohenheim.ch>2023-02-04 20:27:27 +0100
commit39998e96e8f887afdf79c02c7873d7c70bf1530c (patch)
tree13d123c36cdae69e9e2285d8488dbe26ecf37fb4 /src/control/character_controller.rs
parent9e89a71257a2d2fa78c2c97449280100f3a94725 (diff)
downloadrapier-39998e96e8f887afdf79c02c7873d7c70bf1530c.tar.gz
rapier-39998e96e8f887afdf79c02c7873d7c70bf1530c.tar.bz2
rapier-39998e96e8f887afdf79c02c7873d7c70bf1530c.zip
Fix grounded false positives when normal is [0, 0]
Diffstat (limited to 'src/control/character_controller.rs')
-rw-r--r--src/control/character_controller.rs2
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;
}