OnActorBeginOverlap fires in Blueprint but not in C++

I want to create a Projectile and therefore I was trying around with collision events. I created a very simple c++ class just with a SphereComponent and an overlap function

the .h

/** sphere component */
    	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Projectile Components")
    		USphereComponent* Sphere1;
    	
    	void OnOverlapBegin(class AActor* OtherActor);

the .cpp

 ATOEProjectile::ATOEProjectile()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	Sphere1 = CreateDefaultSubobject<USphereComponent>(TEXT("Sphere1"));
	Sphere1->InitSphereRadius(250.0f);
	RootComponent = Sphere1;

	OnActorBeginOverlap.AddDynamic(this, &ATOEProjectile::OnOverlapBegin);
}
    
    void ATOEProjectile::OnOverlapBegin(class AActor* OtherActor)
    {
    	GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("This is an on screen message!"));
    }

I created a blueprint of it an simply move it by SetActorLocation(). When it collides with an other Actor ( a simple Box) nothing happens. But when I use the ActorBeginOverlap of the blueprinted class i get feedback.

I also tried this in 4.10.2 and got the same result. Am I doing somehting wrong here?

Not working and now it gets really odd because if I call the parent function and then print a message i can see the message

Try this! To call C++ parent function you must specify parent call if event overriden in Blueprint.

Try this code:

virtual void NotifyActorBeginOverlap(AActor* OtherActor) override;

instead adding function to delegate

That worked! Thank you.

Where did you find that? I didnt’t read about that function in any Documentation.

EDIT

I now know why my Function didn’t fire. In order to use a function as a delegate you have to use UFUNCTION() as prefix. That solved my problem.

Both ways worked.