Focus Actor position if no Actor bounding box.

This commit is contained in:
Chandler Cox
2025-05-23 14:44:53 -05:00
parent 9ba1c4c338
commit 21ae2d5d40

View File

@@ -1031,6 +1031,8 @@ namespace FlaxEditor
{
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
BoundingSphere.FromBox(ref box, out sphere);
if (sphere == BoundingSphere.Empty)
sphere = new BoundingSphere(actor.Position, sphere.Radius);
sphere.Radius = Math.Max(sphere.Radius, 15.0f);
}
else