diff --git a/scene/3d/navigation_obstacle.cpp b/scene/3d/navigation_obstacle.cpp index 843f72f23..6508f1bb4 100644 --- a/scene/3d/navigation_obstacle.cpp +++ b/scene/3d/navigation_obstacle.cpp @@ -213,12 +213,11 @@ real_t NavigationObstacle::estimate_agent_radius() const { } Vector3 s = parent_spatial->get_global_transform().basis.get_scale(); radius *= MAX(s.x, MAX(s.y, s.z)); - } - if (radius > 0.0) { - return radius; + if (radius > 0.0) { + return radius; + } } - return 1.0; // Never a 0 radius }