AActor::OnActorBeginOverlap
#include "GameFramework/Actor.h"
Access: public
Specifiers: UPROPERTYBlueprintAssignable
Description
Multicast delegate fired when another actor begins overlapping this actor. Bind to this in Blueprint or C++ to respond to overlap entry events without subclassing.
Caveats & Gotchas
- • Both this actor's components and the overlapping actor's components must have bGenerateOverlapEvents = true (or Generate Overlap Events in the editor) for this delegate to fire. A common setup mistake is enabling it only on one side.
- • This fires at the actor level — for more granular per-component overlap info (which component specifically was hit), use UPrimitiveComponent::OnComponentBeginOverlap instead.
- • Not called during level streaming load unless bGenerateOverlapEventsDuringLevelStreaming is true on this actor.
Signature
UPROPERTY(BlueprintAssignable, Category="Collision")
FActorBeginOverlapSignature OnActorBeginOverlap Examples
Destroy a projectile when it overlaps an enemy character
Blueprint
Bind to overlap in BeginPlay C++
void AMyTrigger::BeginPlay()
{
Super::BeginPlay();
OnActorBeginOverlap.AddDynamic(this, &AMyTrigger::HandleOverlapBegin);
}
void AMyTrigger::HandleOverlapBegin(AActor* OverlappedActor, AActor* OtherActor)
{
UE_LOG(LogTemp, Log, TEXT("%s entered trigger"), *OtherActor->GetName());
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?