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 and mockersf committed Mar 8, 2024
1 parent 3c3241a commit cc153ec
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 @@ -319,7 +319,7 @@ impl<'w, 's, T: GizmoConfigGroup> Gizmos<'w, 's, T> {
SphereBuilder {
gizmos: self,
position,
rotation,
rotation: rotation.normalize(),
radius,
color,
circle_segments: DEFAULT_CIRCLE_SEGMENTS,
Expand Down

0 comments on commit cc153ec

Please sign in to comment.