Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jondolf committed Feb 21, 2024
1 parent e114dd6 commit 17b96f1
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions src/plugins/debug/gizmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,19 @@ impl<'w, 's> PhysicsGizmoExt for Gizmos<'w, 's, PhysicsGizmos> {

// Draw ray as arrow
#[cfg(feature = "2d")]
self.draw_arrow(origin, origin + direction.adjust_precision() * max_toi, 8.0, ray_color);
self.draw_arrow(
origin,
origin + direction.adjust_precision() * max_toi,
8.0,
ray_color,
);
#[cfg(feature = "3d")]
self.draw_arrow(origin, origin + direction.adjust_precision() * max_toi, 0.1, ray_color);
self.draw_arrow(
origin,
origin + direction.adjust_precision() * max_toi,
0.1,
ray_color,
);

// Draw all hit points and normals
for hit in hits {
Expand Down Expand Up @@ -525,9 +535,19 @@ impl<'w, 's> PhysicsGizmoExt for Gizmos<'w, 's, PhysicsGizmos> {
// Draw arrow from origin to position of shape at final hit
// TODO: We could render the swept collider outline instead
#[cfg(feature = "2d")]
self.draw_arrow(origin, origin + max_toi * direction.adjust_precision(), 8.0, ray_color);
self.draw_arrow(
origin,
origin + max_toi * direction.adjust_precision(),
8.0,
ray_color,
);
#[cfg(feature = "3d")]
self.draw_arrow(origin, origin + max_toi * direction.adjust_precision(), 0.1, ray_color);
self.draw_arrow(
origin,
origin + max_toi * direction.adjust_precision(),
0.1,
ray_color,
);

// Draw all hit points, normals and the shape at the hit points
for hit in hits {
Expand Down

0 comments on commit 17b96f1

Please sign in to comment.