RealDocs

AActor::IsOverlappingActor

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

Description

Returns true if any component of this actor overlaps any component of the given actor. Checks against the currently cached overlap state, not a live physics query.

Caveats & Gotchas

  • The result depends on the cached overlap list, not a real-time physics query. If UpdateOverlaps() hasn't been called after a non-swept move, this can return stale results.
  • Both actors must have bGenerateOverlapEvents enabled on at least one overlapping component pair for the overlap to have been registered in the first place.

Signature

ENGINE_API bool IsOverlappingActor(const AActor* Other) const

Parameters

Name Type Description Default
Other const AActor* The other actor to test overlap against.

Return Type

bool

Examples

Gate a destroy call behind an overlap check Blueprint
Event BeginPlay Branch Condition Condition True False Destroy Actor Target is Actor Is Overlapping Actor Target is Actor Other Return Value Target Actor Target Actor Target Actor
Edit Blueprint graph Gate a destroy call behind an overlap check
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Gate logic behind overlap check C++
if (IsOverlappingActor(TargetActor))
{
    // Already in contact — don't re-apply effect
    return;
}

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.