Zendir Editor allows users to retrieve the bounds of a box or cylinder that encompasses the mesh of simulation entities. Potential use cases for this feature included determining if a spacecraft will fit within the allocated space for a ride-share mission or the rocket payload fairing. An option to draw the bounding shape and versions of the Box and Cylindrical bounds that feature margin parameters is also available.
Bounds Functions
The functions below can be used to get the bounding Box or Cylinder for any Unreal Actor. These can also be used to draw the bounds to the viewport, allowing the bounds to be visualized.
NOTE
These functions support any Unreal actor. This includes spacecraft, ground stations or any components, provided they have a valid 3D mesh.
Users can enable the drawing of the bounding shape and the color to be used. To visualize the bounding shape, the function needs to be called for every Unreal frame, onEvent Tick
or Event Simulation Tick
. When using the Bounding Cylinder, the central axis also needs to be defined. The Margin
function variations below need to be used to perform the bounding analysis with a margin applied. These functions have an extra parameter that scales the returned dimensions. Therefore, a Margin of 1.25 will return dimensions 25% larger than the actual, which is helpful to add a safety factor.
NOTE
All four methods are marked as Development only as they will not be compiled into a build. However, they should work in Zendir Editor on any deployment.
If you want a specific mesh to be ignored by the Bounding functions, its collision preset needs to be set to No Collision
in the details panel.