Merge pull request #108281 from dmlary/nav_obstacle-avoidance-enabled-fix

NavMap3D: check if obstacles have avoidance enabled
This commit is contained in:
Thaddeus Crews 2025-07-07 10:08:00 -05:00
commit 9d917f4b14
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -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<Vector3> &_obstacle_vertices = obstacle->get_vertices();