Cannot get into NotifyHit function

I am trying to get a function to call in my pawn class whenever my pawn bumps into something or hits it. (It’s going to damage the ships shields based on how hard I hit an object.)

I am using a pawn with the starter content UFO guy for now as I get the game working.

I am trying to simply override the NotifyHit function Here’s what I’ve got:

In the Pawn’s header:

	UFUNCTION()
		virtual void NotifyHit(class UPrimitiveComponent* MyComp, AActor* Other, class UPrimitiveComponent* OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult& Hit) override;

In the Cpp:

void ATestPawn::NotifyHit(class UPrimitiveComponent* MyComp, AActor* Other, class UPrimitiveComponent* OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult& Hit)
{
	GEngine->AddOnScreenDebugMessage(1, 15.0f, FColor::Red, "I am being notified of a hit.");
}

I do not get into this function at all.

I forgot to mention but I DO have the following line in the pawn’s constructor:
SetActorEnableCollision(true);

On the Root Mesh Component I had to enable the following settings.

PawnMeshComponent->SetNotifyRigidBodyCollision(true);

I should point out that This C++ variable corresponds to a bool in the editor named: Simulation Generates Hit Events. One of these names should probably be updated to more appropriately reflect the other.

Thank you.

Thanks, it actually solved my problems.

Finally solved for me, thanks!
staticMesh->SetNotifyRigidBodyCollision(true) worked for me too!

Really irritates me the lack of documentation UE has, you end up getting stuck on simple problems.