Fix NavigationObstacle not estimating radius

(cherry picked from commit acf86efebc)
This commit is contained in:
Haoyu Qiu 2022-09-29 14:39:14 +08:00
parent f8eed6372c
commit 0fdda75fdc

View File

@ -216,12 +216,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
}