# Component End Overlap not working. C++

**URL:** <https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234>\
**Category:** C++\
**Tags:** triggerbox, unreal-engine, delegate, CPP, question\
**Created:** [May 12, 2016, 3:31pm UTC](https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234 "2016-05-12T15:31:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_c42a4aec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c42a4aec](https://forums.unrealengine.com/u/anonymous_user_c42a4aec)\
**Post date:** [May 12, 2016, 3:31pm UTC](https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234/1 "2016-05-12T15:31:11Z")

</div>

I’m trying to set up an Overlap End for a trigger box in c++. RepairStation is the name for this class. Here is the tBox set up.

In RepairStation.h

```
 UPROPERTY(EditAnywhere)  
	UShapeComponent *tBox;

```

In RepairStation.cpp  
// in constructor

```
tBox = CreateDefaultSubobject<UBoxComponent>(TEXT("Trigger Box"));  

tBox->bGenerateOverlapEvents = true;  

 tBox->OnComponentEndOverlap.AddDynamic(this, &ARepairStation::TriggerExit);

  RootComponent = tBox;

```

TriggerExit function:

```
  void ARepairStation::TriggerExit(class AActor* OtherActor, class UPrimitiveComponent* OtherComp,int32OtherBodyIndex) 
         {
          //printing debug messages here
         }

```

Below I’ve displayed my working TriggerEnter function.

In RepairStation.h

```
  UFUNCTION()
	void TriggerEnter(class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);

```

In RepairStation.cpp

```
  void ARepairStation::TriggerEnter( class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
 {								 
//Print debug message here
 }

 tBox->OnComponentBeginOverlap.AddDynamic(this, &ARepairStation::TriggerEnter); // in constructor

```

I currently have a working BEGIN overlap for the same tBox, set-up in the same way, although I pass a different delegate signature. The root problem is that the End Over lap function isn’t working, while the begin overlap does.

Any help would he appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [May 12, 2016, 6:21pm UTC](https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234/2 "2016-05-12T18:21:14Z")

</div>

Hey Dead-Beat-

There is a known issue that binding the OnComponentEndOverlap function does not trigger (UE-29879). You can instead use OnActorEndOverlap, any component that is set to trigger overlap events will then trigger the bound function.

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c42a4aec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c42a4aec](https://forums.unrealengine.com/u/anonymous_user_c42a4aec)\
**Post date:** [May 13, 2016, 12:37pm UTC](https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234/3 "2016-05-13T12:37:59Z")

</div>

Hey ,

Thanks for the quick response. I actually managed to get it working last night. After I made sure all my code was right (to my knowledge) I simply drug a new instance of the class blue print into the editor and everything worked smoothly.

---

<div class="post-metadata">

**Author:** ![CometGoat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CometGoat](https://forums.unrealengine.com/u/CometGoat)\
**Post date:** [April 27, 2021, 3:54pm UTC](https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234/4 "2021-04-27T15:54:28Z")

</div>

For anyone looking for the correct signature to bind it’s:

`OnComponentEndOverlap(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)`

---

<div class="post-metadata">

**Author:** ![X\_Starter\_X](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/x_starter_x/32/590039_2.png) [@X\_Starter\_X](https://forums.unrealengine.com/u/X_Starter_X)\
**Post date:** [February 29, 2024, 9:35am UTC](https://forums.unrealengine.com/t/component-end-overlap-not-working-c/357234/5 "2024-02-29T09:35:14Z")

</div>

It’s amazing. But it still doesn’t work. UE 5.2.1.
