AActor::NotifyActorEndOverlap
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualENGINE_API
Description
Called when all overlapping component pairs between this actor and another actor have separated. Override to respond to actor-level overlap end events in C++.
Caveats & Gotchas
- • End overlap is not guaranteed to fire if the overlapping actor is destroyed while still overlapping — the actor may be garbage collected before the separation event is processed.
- • Like NotifyActorBeginOverlap, both components need bGenerateOverlapEvents = true. Disabling this flag mid-overlap will prevent the end event from being issued.
- • When an actor is being torn down (EndPlay), pending end overlap notifications may be flushed in bulk. Do not rely on the order of end overlap calls relative to EndPlay.
Signature
ENGINE_API virtual void NotifyActorEndOverlap(AActor* OtherActor); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| OtherActor | AActor* | The other actor whose component stopped overlapping all components of this actor. | — |
Return Type
void Example
Override to handle player exit C++
void AMyTriggerActor::NotifyActorEndOverlap(AActor* OtherActor)
{
Super::NotifyActorEndOverlap(OtherActor);
if (ACharacter* Character = Cast<ACharacter>(OtherActor))
{
DeactivateTrigger(Character);
}
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?