diff options
| author | Jan Nils Ferner <contact@jnferner.com> | 2023-01-26 20:41:48 +0100 |
|---|---|---|
| committer | Jan Nils Ferner <contact@jnferner.com> | 2023-01-26 20:41:48 +0100 |
| commit | 4fcbd53bfe7c1d624e939a72fa25b44ebf67eb98 (patch) | |
| tree | 9486476bd192daf7d319f2f72c95ac94554eddf7 /src | |
| parent | ecd57a651905c54c2bddb8dcb64770da089e9ba5 (diff) | |
| download | rapier-4fcbd53bfe7c1d624e939a72fa25b44ebf67eb98.tar.gz rapier-4fcbd53bfe7c1d624e939a72fa25b44ebf67eb98.tar.bz2 rapier-4fcbd53bfe7c1d624e939a72fa25b44ebf67eb98.zip | |
Refactor variable
Diffstat (limited to 'src')
| -rw-r--r-- | src/control/character_controller.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index fe355a4..19943f6 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -736,5 +736,6 @@ impl KinematicCharacterController { } 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 } |
