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` (bevyengine#12375)

# Objective

Fixes bevyengine#12360.

## Solution

Normalize the rotation `Quat` in `sphere`.
  • Loading branch information
chompaa authored and spectria-limina committed Mar 9, 2024
1 parent 0dfc02d commit bd55d52
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 bd55d52

Please sign in to comment.