aboutsummaryrefslogtreecommitdiff
path: root/src/control/character_controller.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/character_controller.rs')
-rw-r--r--src/control/character_controller.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs
index 39fa9b0..1b5a792 100644
--- a/src/control/character_controller.rs
+++ b/src/control/character_controller.rs
@@ -738,6 +738,6 @@ impl KinematicCharacterController {
}
fn subtract_hit(translation: Vector<Real>, hit: &TOI, offset: Real) -> Vector<Real> {
- let hit_normal = (translation.dot(&hit.normal1) * (1.0 + offset)).min(0.0);
- translation - *hit.normal1 * hit_normal
+ let surface_correction = translation.dot(&hit.normal1) * (1.0 + offset);
+ translation - *hit.normal1 * surface_correction
}