Skip to content

Commit

Permalink
Fix gizmos panicking given bad output from `GlobalTransform::to_scale…
Browse files Browse the repository at this point in the history
…_rotation_translation` (#12375)

# Objective

Fixes #12360.

## Solution

Normalize the rotation `Quat` in `sphere`.
  • Loading branch information
chompaa authored Mar 8, 2024
1 parent ffb1bc6 commit c75d145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_gizmos/src/gizmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ impl<'w, 's, T: GizmoConfigGroup> Gizmos<'w, 's, T> {
SphereBuilder {
gizmos: self,
position,
rotation,
rotation: rotation.normalize(),
radius,
color: color.into(),
circle_segments: DEFAULT_CIRCLE_SEGMENTS,
Expand Down

0 comments on commit c75d145

Please sign in to comment.