Skip to content

Commit 09c9bcc

Browse files
committed
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
1 parent 9b22b41 commit 09c9bcc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/navigation_3d/nav_map_3d.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,9 @@ void NavMap3D::_update_rvo_obstacles_tree_2d() {
500500
// The following block is modified copy from RVO2D::AddObstacle()
501501
// Obstacles are linked and depend on all other obstacles.
502502
for (NavObstacle3D *obstacle : obstacles) {
503+
if (!obstacle->is_avoidance_enabled()) {
504+
continue;
505+
}
503506
const Vector3 &_obstacle_position = obstacle->get_position();
504507
const Vector<Vector3> &_obstacle_vertices = obstacle->get_vertices();
505508

0 commit comments

Comments
 (0)