Merge branch 'focus-actor-no-box' of https://github.com/Tryibion/FlaxEngine into Tryibion-focus-actor-no-box
This commit is contained in:
@@ -1031,6 +1031,8 @@ namespace FlaxEditor
|
|||||||
{
|
{
|
||||||
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
|
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
|
||||||
BoundingSphere.FromBox(ref box, out sphere);
|
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);
|
sphere.Radius = Math.Max(sphere.Radius, 15.0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user