Skip to content

Commit 5bedaf7

Browse files
committed
Fix 2D debug navigation flickering with tile maps
Both the tile map layers and the debug navigation canvas items did fight for the same z order causing a lot of flickering in certain situations.
1 parent b6223c0 commit 5bedaf7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scene/2d/navigation_region_2d.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ void NavigationRegion2D::_update_debug_mesh() {
452452
const Transform2D region_gt = get_global_transform();
453453

454454
rs->canvas_item_set_parent(debug_instance_rid, get_world_2d()->get_canvas());
455+
rs->canvas_item_set_z_index(debug_instance_rid, RS::CANVAS_ITEM_Z_MAX - 2);
455456
rs->canvas_item_set_transform(debug_instance_rid, region_gt);
456457

457458
if (!debug_mesh_dirty) {

0 commit comments

Comments
 (0)