@@ -816,9 +816,16 @@ namespace FlaxEditor
|
|||||||
/// <param name="sphere">The bounding sphere.</param>
|
/// <param name="sphere">The bounding sphere.</param>
|
||||||
public static void GetActorEditorSphere(Actor actor, out BoundingSphere sphere)
|
public static void GetActorEditorSphere(Actor actor, out BoundingSphere sphere)
|
||||||
{
|
{
|
||||||
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
|
if (actor)
|
||||||
BoundingSphere.FromBox(ref box, out sphere);
|
{
|
||||||
sphere.Radius = Math.Max(sphere.Radius, 15.0f);
|
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
|
||||||
|
BoundingSphere.FromBox(ref box, out sphere);
|
||||||
|
sphere.Radius = Math.Max(sphere.Radius, 15.0f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sphere = BoundingSphere.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -828,7 +835,14 @@ namespace FlaxEditor
|
|||||||
/// <param name="box">The bounding box.</param>
|
/// <param name="box">The bounding box.</param>
|
||||||
public static void GetActorEditorBox(Actor actor, out BoundingBox box)
|
public static void GetActorEditorBox(Actor actor, out BoundingBox box)
|
||||||
{
|
{
|
||||||
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out box);
|
if (actor)
|
||||||
|
{
|
||||||
|
Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out box);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
box = BoundingBox.Zero;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user