diff options
| author | Linentio <96549149+Linentio@users.noreply.github.com> | 2023-09-30 13:27:50 +0200 |
|---|---|---|
| committer | Linentio <96549149+Linentio@users.noreply.github.com> | 2023-09-30 13:27:50 +0200 |
| commit | 6c901d57742205de0ebe191cd2c1acd94532f2d9 (patch) | |
| tree | 5068000753484ee3d4d11b2964a2f2f6304ab33c | |
| parent | fa2be3fc9c4b646756d5cf7eb5b00a906d9b2362 (diff) | |
| download | rapier-6c901d57742205de0ebe191cd2c1acd94532f2d9.tar.gz rapier-6c901d57742205de0ebe191cd2c1acd94532f2d9.tar.bz2 rapier-6c901d57742205de0ebe191cd2c1acd94532f2d9.zip | |
Use the absolute value of the up attribute when calculating side_extent
| -rw-r--r-- | src/control/character_controller.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/character_controller.rs b/src/control/character_controller.rs index 3a8aa40..ca088b2 100644 --- a/src/control/character_controller.rs +++ b/src/control/character_controller.rs @@ -522,7 +522,7 @@ impl KinematicCharacterController { fn compute_dims(&self, character_shape: &dyn Shape) -> Vector2<Real> { let extents = character_shape.compute_local_aabb().extents(); let up_extent = extents.dot(&self.up.abs()); - let side_extent = (extents - *self.up * up_extent).norm(); + let side_extent = (extents - (*self.up).abs() * up_extent).norm(); Vector2::new(side_extent, up_extent) } |
