Refactor variable

This commit is contained in:
Jan Nils Ferner
2023-01-26 20:41:48 +01:00
parent ecd57a6519
commit 4fcbd53bfe

View File

@@ -736,5 +736,6 @@ impl KinematicCharacterController {
} }
fn subtract_hit(translation: Vector<Real>, hit: &TOI, offset: Real) -> Vector<Real> { fn subtract_hit(translation: Vector<Real>, hit: &TOI, offset: Real) -> Vector<Real> {
translation - *hit.normal1 * ((translation).dot(&hit.normal1) * (1.0 + offset)).min(0.0) let hit_normal = (translation.dot(&hit.normal1) * (1.0 + offset)).min(0.0);
translation - *hit.normal1 * hit_normal
} }