You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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
This commit is contained in:
@@ -444,6 +444,9 @@ void NavMap2D::_update_rvo_obstacles_tree() {
|
||||
// The following block is modified copy from RVO2D::AddObstacle()
|
||||
// Obstacles are linked and depend on all other obstacles.
|
||||
for (NavObstacle2D *obstacle : obstacles) {
|
||||
if (!obstacle->is_avoidance_enabled()) {
|
||||
continue;
|
||||
}
|
||||
const Vector2 &_obstacle_position = obstacle->get_position();
|
||||
const Vector<Vector2> &_obstacle_vertices = obstacle->get_vertices();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user