Unreal Engine 5 · Blueprint → C++
Event On Component Begin Overlap in Unreal Engine 5 C++UE Docs
The Blueprint Event On Component Begin Overlap maps to the OnComponentBeginOverlap multicast delegate on UPrimitiveComponent. Bind a UFUNCTION() handler with AddDynamic to react when another component enters this one.
Blueprint node & C++ equivalent
UFUNCTION()
void OnBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
const FHitResult& SweepResult);MyCollision->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::OnBeginOverlap);What does Event On Component Begin Overlap do?
It fires the moment another primitive component starts overlapping this component, as long as both have overlap events enabled and their collision responses are set to Overlap. It is the standard way to detect a player or projectile entering a trigger volume, pickup, or damage zone.
In C++ this event is exposed as the OnComponentBeginOverlap delegate, which lives on every UPrimitiveComponent such as UBoxComponent, USphereComponent, and UStaticMeshComponent.
The C++ equivalent
Declare a handler marked with UFUNCTION() whose signature exactly matches the delegate: OnBeginOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult). The UFUNCTION() macro is mandatory because AddDynamic binds a dynamic delegate that requires a reflected function.
Bind it in the constructor or BeginPlay with MyCollision->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::OnBeginOverlap);. The OtherActor parameter tells you who entered, and SweepResult carries hit data when the overlap was produced by a sweep.
Common mistakes
The handler never fires if overlap events are disabled. Call SetGenerateOverlapEvents(true) on both components and make sure at least one sets its response to the other to Overlap. Omitting the UFUNCTION() macro on the handler breaks the AddDynamic binding, since dynamic multicast delegates can only bind reflected functions.
Frequently asked questions
Why is OnComponentBeginOverlap not firing in UE5 C++?+
Confirm both components have SetGenerateOverlapEvents(true), their collision is at least QueryOnly, and the channel response is set to Overlap rather than Block or Ignore. Also verify the handler has the UFUNCTION() macro.
What is the exact signature for the begin overlap handler?+
It takes UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, and const FHitResult& SweepResult. The parameter order and types must match the delegate exactly.