# Default Character Capsule Component not firing collision events

**URL:** <https://forums.unrealengine.com/t/default-character-capsule-component-not-firing-collision-events/361098>\
**Category:** World Creation\
**Tags:** unreal-engine, Collision, CPP, question\
**Created:** [June 17, 2016, 1:49pm UTC](https://forums.unrealengine.com/t/default-character-capsule-component-not-firing-collision-events/361098 "2016-06-17T13:49:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_98b679e4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_98b679e4](https://forums.unrealengine.com/u/anonymous_user_98b679e4)\
**Post date:** [June 17, 2016, 1:49pm UTC](https://forums.unrealengine.com/t/default-character-capsule-component-not-firing-collision-events/361098/1 "2016-06-17T13:49:00Z")

</div>

I can’t seem to get the capsule component to fire collision events.

Here’s the relevant code

```
GetCapsuleComponent()->bGenerateOverlapEvents = true;
GetCapsuleComponent()->OnComponentBeginOverlap.AddDynamic(this, &AUnRexCharacter::TriggerEnter);

```

And the actual function (which never gets fired):

```
void AUnRexCharacter::TriggerEnter(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Overlap With Character"));
	if (OtherActor->IsA(AObstacleActor::StaticClass()))
		SetActorLocation(StartingLocation);
}

```

I’ve checked all the editor settings, and my character’s capsule component collision profile is set to “Pawn”, and the other actor collision profile is set to “OverlapOnlyPawn”.

---

<div class="post-metadata">

**Author:** ![Wojtt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wojtt](https://forums.unrealengine.com/u/Wojtt)\
**Post date:** [December 13, 2016, 8:52pm UTC](https://forums.unrealengine.com/t/default-character-capsule-component-not-firing-collision-events/361098/2 "2016-12-13T20:52:26Z")

</div>

Try setting the AUnRexCharacter’s capsule component collision profile as follows:

GetCapsuleComponent()-\>SetCollisionProfileName(TEXT(“OverlapAll”));

---

<div class="post-metadata">

**Author:** ![Wojtt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Wojtt](https://forums.unrealengine.com/u/Wojtt)\
**Post date:** [December 13, 2016, 8:53pm UTC](https://forums.unrealengine.com/t/default-character-capsule-component-not-firing-collision-events/361098/3 "2016-12-13T20:53:15Z")

</div>

Try setting the AUnRexCharacter’s capsule component collision profile as follows:

GetCapsuleComponent()-\>SetCollisionProfileName(TEXT(“OverlapAll”));
