We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c6d34a commit 84b66d6Copy full SHA for 84b66d6
1 file changed
src/control/character_controller.rs
@@ -519,7 +519,9 @@ impl KinematicCharacterController {
519
) -> bool {
520
let normal = -(character_pos * manifold.local_n1);
521
522
- if normal.dot(&self.up) >= 1.0e-5 {
+ // For the controller to be grounded, the angle between the contact normal and the up vector
523
+ // has to be smaller than acos(1.0e-3) = 89.94 degrees.
524
+ if normal.dot(&self.up) >= 1.0e-3 {
525
let prediction = self.predict_ground(dims.y);
526
for contact in &manifold.points {
527
if contact.dist <= prediction {
0 commit comments