From 21580f94ad3636444a5574052144dfb30c655b5f Mon Sep 17 00:00:00 2001 From: Ricardo Buring Date: Sun, 3 Apr 2022 22:11:44 +0200 Subject: [PATCH] NavigationObstacle2D: estimate agent radius only when configured to do so --- scene/2d/navigation_obstacle_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index e0547d3e9dc..d829c73b1f8 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -147,7 +147,7 @@ void NavigationObstacle2D::initialize_agent() { } void NavigationObstacle2D::reevaluate_agent_radius() { - if (!estimate_agent_radius()) { + if (!estimate_radius) { Navigation2DServer::get_singleton()->agent_set_radius(agent, radius); } else if (parent_node2d && parent_node2d->is_inside_tree()) { Navigation2DServer::get_singleton()->agent_set_radius(agent, estimate_agent_radius());