Remove unnecessary clamp

This commit is contained in:
Jan Nils Ferner
2023-01-27 14:10:14 +01:00
parent 942cf76150
commit eaa3d8e259

View File

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