Fix grounded false positives when normal is [0, 0]
This commit is contained in:
@@ -404,7 +404,7 @@ impl KinematicCharacterController {
|
|||||||
|
|
||||||
for m in &manifolds {
|
for m in &manifolds {
|
||||||
let normal = -(character_pos * m.local_n1);
|
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;
|
grounded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user