Merge pull request #59848 from rburing/estimate_agent_radius_inside_tree
[3.x] `NavigationObstacle2D`: estimate agent radius only when configured to do so
This commit is contained in:
commit
1183abfb79
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue