Skip to content

Commit

Permalink
Fix gizmo draw order in 2D (#9129)
Browse files Browse the repository at this point in the history
# Objective

Gizmos are intended to draw over everything but for some reason I set
the sort key to `0` during #8427 :v

I didn't catch this mistake because it still draws over sprites with a Z
translation of `0`.

## Solution

Set the sort key to `f32::INFINITY`.
  • Loading branch information
tim-blackbird authored and cart committed Aug 10, 2023
1 parent 6cab87c commit 656fcb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_gizmos/src/pipeline_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ fn queue_line_gizmos_2d(
entity,
draw_function,
pipeline,
sort_key: FloatOrd(0.),
sort_key: FloatOrd(f32::INFINITY),
batch_range: None,
});
}
Expand Down

0 comments on commit 656fcb2

Please sign in to comment.