Gets the actor bounding sphere (including child actors). The actor. The bounding sphere.
(Actor actor, out BoundingSphere sphere)
| 1054 | /// <param name="actor">The actor.</param> |
| 1055 | /// <param name="sphere">The bounding sphere.</param> |
| 1056 | public static void GetActorEditorSphere(Actor actor, out BoundingSphere sphere) |
| 1057 | { |
| 1058 | if (actor) |
| 1059 | { |
| 1060 | Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box); |
| 1061 | BoundingSphere.FromBox(ref box, out sphere); |
| 1062 | if (sphere == BoundingSphere.Empty) |
| 1063 | sphere = new BoundingSphere(actor.Position, sphere.Radius); |
| 1064 | sphere.Radius = Math.Max(sphere.Radius, 15.0f); |
| 1065 | } |
| 1066 | else |
| 1067 | { |
| 1068 | sphere = BoundingSphere.Empty; |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | /// <summary> |
| 1073 | /// Closes editor splash screen popup window. |
no test coverage detected