OnComponentHit Function not working

Hello, I’m having problem with the OnComponentHit activation.

Basically I’ve written this code for my projectile class:

And this is how the OnHit function is declared and defined:

The problem is that the OnHit function is never called.

The collision settings on my projectile’s static mesh component (which is the root component and the only scene component of the actor) are the following:

And those are the collision settings of the object type “Enemy”:

In game, the only things that actually block my projectile are indeed actors with collision type of “Enemy”, but the OnHit function is never called.

Can somebody help me and tell me what I’m missing here? Thanks a lot!

Try binding in BeginPlay() instead of the constructor. For some reason the constructor doesn’t always bind to events correctly.