Fix grounded false positives when normal is [0, 0]

This commit is contained in:
Jan Hohenheim
2023-02-04 20:27:27 +01:00
parent 9e89a71257
commit 39998e96e8

View File

@@ -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;
}