RealDocs

UKismetMathLibrary::MakeBox

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticBlueprintPureNativeMakeFunc

Description

Constructs an FBox from explicit Min and Max corners and sets IsValid to true. Use this when you already know both extents rather than building the box incrementally with the += operator.

Caveats & Gotchas

  • IsValid is set to true unconditionally, even if Min > Max on any axis. An FBox with inverted axes is considered valid by the engine but will produce incorrect results from Contains(), Intersect(), and GetExtent(). Always ensure Min <= Max on all axes before calling.
  • This is the NativeMakeFunc for FBox in Blueprint, meaning it is the node that appears when you drag off an FBox pin and choose 'Make FBox'. Its inputs are Min and Max world-space corners, not center-plus-extent — which is the opposite convention from MakeBoxWithOrigin.
  • FBox stores corners as FVector (double precision in UE5). For large world coordinates the precision is sufficient, but boxes created from float-precision sources may have accumulated rounding error in the corners.

Signature

static UE_INL_API FBox MakeBox(FVector Min, FVector Max)

Parameters

Name Type Description Default
Min FVector The minimum corner of the axis-aligned bounding box.
Max FVector The maximum corner of the axis-aligned bounding box.

Return Type

FBox

Example

Create a trigger volume bounds box C++
FVector BoxMin(-200.0, -200.0, 0.0);
FVector BoxMax( 200.0,  200.0, 400.0);
FBox TriggerBounds = UKismetMathLibrary::MakeBox(BoxMin, BoxMax);

// Check if a point is inside
FVector TestPoint = HitActor->GetActorLocation();
if (TriggerBounds.IsInsideOrOn(TestPoint))
{
    ActivateTrigger();
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.