Skip to content

Commit 7345766

Browse files
Fix gizmo draw order in 2D (#9129)
# 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`.
1 parent 701767a commit 7345766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_gizmos/src/pipeline_2d.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ fn queue_line_gizmos_2d(
166166
entity,
167167
draw_function,
168168
pipeline,
169-
sort_key: FloatOrd(0.),
169+
sort_key: FloatOrd(f32::INFINITY),
170170
batch_range: None,
171171
});
172172
}

0 commit comments

Comments
 (0)