Skip to content

Commit 780f3d5

Browse files
committed
NavMap2D: check if obstacles have avoidance enabled
In NavMap2D::_update_rvo_obstacles_tree() check if the NavObstacle2D has avoidance enabled before adding it to the tree. This is the 2D fix for #108259
1 parent 9b22b41 commit 780f3d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/navigation_2d/nav_map_2d.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,9 @@ void NavMap2D::_update_rvo_obstacles_tree() {
444444
// The following block is modified copy from RVO2D::AddObstacle()
445445
// Obstacles are linked and depend on all other obstacles.
446446
for (NavObstacle2D *obstacle : obstacles) {
447+
if (!obstacle->is_avoidance_enabled()) {
448+
continue;
449+
}
447450
const Vector2 &_obstacle_position = obstacle->get_position();
448451
const Vector<Vector2> &_obstacle_vertices = obstacle->get_vertices();
449452

0 commit comments

Comments
 (0)