From 09c9bccb8529e29d4ef23c3d3a21ce7a02a176c2 Mon Sep 17 00:00:00 2001 From: "David M. Lary" Date: Fri, 4 Jul 2025 10:16:40 -0500 Subject: [PATCH] NavMap3D: check if obstacles have avoidance enabled In `NavMap3D::_update_rvo_obstacles_tree_2d()` check if the `NavObstacle3D` has avoidance enabled before adding it to the tree. fixes #108259 --- modules/navigation_3d/nav_map_3d.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/navigation_3d/nav_map_3d.cpp b/modules/navigation_3d/nav_map_3d.cpp index 3c9b7d2d992..682b78a543c 100644 --- a/modules/navigation_3d/nav_map_3d.cpp +++ b/modules/navigation_3d/nav_map_3d.cpp @@ -500,6 +500,9 @@ void NavMap3D::_update_rvo_obstacles_tree_2d() { // The following block is modified copy from RVO2D::AddObstacle() // Obstacles are linked and depend on all other obstacles. for (NavObstacle3D *obstacle : obstacles) { + if (!obstacle->is_avoidance_enabled()) { + continue; + } const Vector3 &_obstacle_position = obstacle->get_position(); const Vector &_obstacle_vertices = obstacle->get_vertices();