RealDocs

AActor::GetActorBounds

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONBlueprintCallablevirtual

Description

Computes an axis-aligned bounding box (AABB) for this actor and outputs it as a center origin and half-extents. Useful for placement, UI sizing, and loose spatial queries.

Caveats & Gotchas

  • The bounding box is axis-aligned in world space — it can be significantly larger than the actual mesh for rotated actors. Use the oriented bounding box from the component's BodySetup if you need tight bounds.
  • Skeletal mesh bounds are pre-computed and may not perfectly match the current pose. Calling this every frame for animated characters can return stale or over-estimated extents.
  • If the actor has no renderable or collision components, Origin is set to the actor's location and BoxExtent is (0,0,0) — check for zero extent if you need to validate meaningful bounds.

Signature

ENGINE_API virtual void GetActorBounds(bool bOnlyCollidingComponents, FVector& Origin, FVector& BoxExtent, bool bIncludeFromChildActors = false) const

Parameters

Name Type Description Default
bOnlyCollidingComponents bool If true, only components with collision enabled contribute to the bounding box.
Origin FVector& Set to the center of the actor's bounding box in world space.
BoxExtent FVector& Set to half the actor's size in each axis (world space).
bIncludeFromChildActors bool If true, recurse into ChildActorComponents to include their bounds. false

Return Type

void

Examples

Draw a debug box at the actor's bounding volume on BeginPlay Blueprint
Event BeginPlay Get Actor Bounds Target is Actor Target Only Colliding Components Only Colliding Components false false Origin Box Extent Draw Debug Box Center Extent Persistent Lines false false Life Time 2.0
Edit Blueprint graph Draw a debug box at the actor's bounding volume on BeginPlay
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Draw a debug box around an actor C++
FVector Origin, Extent;
GetActorBounds(false, Origin, Extent);
DrawDebugBox(GetWorld(), Origin, Extent, FColor::Green, false, 2.f);

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.