RealDocs

UKismetMathLibrary::IsPointInBox

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

Description

Determines whether a point lies inside an axis-aligned box, defined by its center and half-extents. Points exactly on the box surface count as inside.

Caveats & Gotchas

  • BoxExtent is a half-size (distance from origin to a face), not the full box dimensions — passing the full size will make the box appear twice as large as intended.
  • The test is axis-aligned in whatever space Point and BoxOrigin are already expressed in; if one is in world space and the other in local space the result is meaningless.
  • Use IsPointInBox_Box if you already have an FBox, and IsPointInBoxWithTransform if the box can be rotated.

Signature

static bool IsPointInBox(FVector Point, FVector BoxOrigin, FVector BoxExtent)

Parameters

Name Type Description Default
Point FVector The point to test.
BoxOrigin FVector Center of the box.
BoxExtent FVector Half-size of the box along each axis, measured from the origin.

Return Type

bool

Example

Check if an actor is inside a trigger volume bounds C++
FVector BoxOrigin = TriggerActor->GetActorLocation();
FVector BoxExtent = FVector(200.f, 200.f, 100.f);
bool bInside = UKismetMathLibrary::IsPointInBox(TargetActor->GetActorLocation(), BoxOrigin, BoxExtent);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.