diff options
| author | Jan Nils Ferner <contact@jnferner.com> | 2023-01-27 23:35:26 +0100 |
|---|---|---|
| committer | Jan Nils Ferner <contact@jnferner.com> | 2023-01-27 23:35:26 +0100 |
| commit | 5bf57c6c50204d1b057234a207c102b3f2fa69f1 (patch) | |
| tree | fe74c7072564766d6e67df75bb3df7d1ed94bd63 | |
| parent | f0563521a327811b5c09fdd194f115fcb2b928fc (diff) | |
| download | rapier-5bf57c6c50204d1b057234a207c102b3f2fa69f1.tar.gz rapier-5bf57c6c50204d1b057234a207c102b3f2fa69f1.tar.bz2 rapier-5bf57c6c50204d1b057234a207c102b3f2fa69f1.zip | |
Fix errors from early stops at penetration when casting
| -rw-r--r-- | src/control/character_controller.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 876714f..5783103 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -229,7 +229,7 @@ impl KinematicCharacterController { &translation_dir, character_shape, translation_dist + offset, - true, + false, filter, ) { // We hit something, compute the allowed self. @@ -338,7 +338,7 @@ impl KinematicCharacterController { &-self.up, character_shape, snap_distance + offset, - true, + false, filter, ) { // Apply the snap. @@ -356,7 +356,7 @@ impl KinematicCharacterController { } fn predict_ground(&self, up_extends: Real) -> Real { - self.offset.eval(up_extends) * 1.4 + self.offset.eval(up_extends) * 1.1 } fn detect_grounded_status_and_apply_friction( @@ -566,7 +566,7 @@ impl KinematicCharacterController { &self.up, character_shape, max_height, - true, + false, filter, ) .is_some() @@ -583,7 +583,7 @@ impl KinematicCharacterController { &horizontal_dir, character_shape, min_width, - true, + false, filter, ) .is_some() @@ -602,7 +602,7 @@ impl KinematicCharacterController { &-self.up, character_shape, max_height, - true, + false, filter, ) { let [_vertical_slope_translation, horizontal_slope_translation] = @@ -629,7 +629,7 @@ impl KinematicCharacterController { &-self.up, character_shape, max_height, - true, + false, filter, ) .map(|hit| hit.1.toi) |
