Merge pull request #78438 from smix8/navagent_debug_z__4.x

Fix NavigationAgent2D path debug hidden behind canvas items
This commit is contained in:
Rémi Verschelde 2023-06-19 15:51:16 +02:00
commit ea5d02b582
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 0 deletions

View File

@ -946,6 +946,7 @@ void NavigationAgent2D::_update_debug_path() {
}
RenderingServer::get_singleton()->canvas_item_set_parent(debug_path_instance, agent_parent->get_canvas());
RenderingServer::get_singleton()->canvas_item_set_z_index(debug_path_instance, RS::CANVAS_ITEM_Z_MAX - 1);
RenderingServer::get_singleton()->canvas_item_set_visible(debug_path_instance, agent_parent->is_visible_in_tree());
const Vector<Vector2> &navigation_path = navigation_result->get_path();