UKismetMathLibrary::GetBoxVolume
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the volume of an axis-aligned box, computed as the product of its extents along each axis.
Caveats & Gotchas
- • Exposed to Blueprint as "Get Volume (Box)" via a DisplayName meta tag rather than the raw function name.
- • Returns 0 for a degenerate box (zero size on any axis), and the result is meaningless if InBox.IsValid() is false.
Signature
static double GetBoxVolume(const FBox& InBox) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InBox | const FBox& | The box to measure. | — |
Return Type
double Example
Compare bounds volume against a threshold C++
FBox RoomBounds = RoomVolume->GetBounds().GetBox();
double Volume = UKismetMathLibrary::GetBoxVolume(RoomBounds);
if (Volume > 1000000.0)
{
// Large room — spawn extra ambient occluders
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?