RealDocs

UKismetMathLibrary::Box_IsInside

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

Description

Returns true only when InnerTest is completely contained within OuterTest, with no part touching or crossing the outer boundary. Uses strict interior (open bounds) semantics — boxes that share a face return false.

Caveats & Gotchas

  • Uses open (strict) bounds — a box that exactly touches the outer boundary on any face, edge, or corner returns false. Use Box_IsInsideOrOn if touching boundaries should count as inside.
  • Both boxes must have IsValid=true. An uninitialized FBox (constructed with no arguments) has IsValid=false and undefined Min/Max, causing incorrect results without any engine warning.

Signature

static ENGINE_API bool Box_IsInside(const FBox& InnerTest, const FBox& OuterTest);

Parameters

Name Type Description Default
InnerTest const FBox& The box to test for containment.
OuterTest const FBox& The candidate containing box.

Return Type

bool

Example

Check whether a pickup's bounds are fully within a trigger volume C++
FBox TriggerBounds = TriggerVolume->GetComponentsBoundingBox();
FBox PickupBounds = Pickup->GetComponentsBoundingBox();
if (UKismetMathLibrary::Box_IsInside(PickupBounds, TriggerBounds))
{
    // pickup is fully enclosed — safe to interact
}

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.