AActor::IsOverlappingActor
#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
Gate logic behind overlap check C++
if (IsOverlappingActor(TargetActor))
{
// Already in contact — don't re-apply effect
return;
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?