Skip to content

Commit

Permalink
Fix 2D debug navigation flickering with tile maps
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
smix8 committed Sep 5, 2024
1 parent b6223c0 commit 5bedaf7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scene/2d/navigation_region_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ void NavigationRegion2D::_update_debug_mesh() {
const Transform2D region_gt = get_global_transform();

rs->canvas_item_set_parent(debug_instance_rid, get_world_2d()->get_canvas());
rs->canvas_item_set_z_index(debug_instance_rid, RS::CANVAS_ITEM_Z_MAX - 2);
rs->canvas_item_set_transform(debug_instance_rid, region_gt);

if (!debug_mesh_dirty) {
Expand Down

0 comments on commit 5bedaf7

Please sign in to comment.