NavigationObstacle2D: estimate agent radius only when configured to do so
This commit is contained in:
parent
a5f9e1ce18
commit
21580f94ad
|
@ -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 New Issue