RealDocs

UKismetMathLibrary::Box_Intersects

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

Description

Returns true if two axis-aligned bounding boxes overlap, including the case where they only share a boundary face or edge. Use this for broad-phase overlap rejection before running expensive narrow-phase collision checks.

Caveats & Gotchas

  • Uses **closed bounds** — two boxes that merely touch along a shared face or edge (coincident borders) are considered to intersect. This is the opposite convention from Box_IsPointInside which uses open bounds. Be deliberate when mixing both in the same system.
  • A zero-volume degenerate box (e.g. a line or plane) can still intersect another box under closed-bound rules. If you need to reject degenerate inputs, check FBox::GetVolume() > 0 before calling.

Signature

static ENGINE_API bool Box_Intersects(const FBox& A, const FBox& B);

Parameters

Name Type Description Default
A const FBox& The first bounding box.
B const FBox& The second bounding box.

Return Type

bool

Example

Broad-phase AABB check before a detailed overlap query C++
FBox BoundsA = ActorA->GetComponentsBoundingBox();
FBox BoundsB = ActorB->GetComponentsBoundingBox();
if (UKismetMathLibrary::Box_Intersects(BoundsA, BoundsB))
{
    // Boxes overlap — worth running the narrow-phase check
    RunDetailedOverlapTest(ActorA, ActorB);
}

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.