'ReceiveActorBeginOverlap' marked 'override' but does not override any member functions

Hi everyone. (Hoping this isn’t already asked, already looked but probably didn’t look hard enough since I couldn’t find a solution)

I am trying to detect collision in my first person shooter using UE 4.9. I try to compile my code but receive

“‘ReceiveActorBeginOverlap’ marked
‘override’ but does not override any
member functions”

in my error log. My header file, where the error is pointing to, looks like this:

#pragma once
 #include "GameFramework/Actor.h"
 #include "HealthPack.generated.h"

UCLASS()
class TESTFPS_API AHealthPack : public AActor
{
    GENERATED_BODY()

public:	
	AHealthPack();	
    AHealthPack(const FObjectInitializer& ObjectInitializer);	

    virtual void 	BeginPlay()  override;
    virtual void 	Tick( float DeltaSeconds ) override;
    virtual void 	ReceiveActorBeginOverlap(class AActor* Other)	override;	

And in my .cpp implementation file l declare this method like this:

void AHealthPack::ReceiveActorBeginOverlap(class AActor* Other)	
{
 	if (Other != NULL)
    {
    	if (CanBePickedUp(Cast<ATestFPSCharacter>(Other)))
    	{
    		HandlePickUp(Cast<ATestFPSCharacter>(Other));
    		HandleEffects();
    		removeFromWorld();
    	}
    }
}

Just a side note that ATestFPSCharacter is my character class which is an autogenerated file from the First Person Shooter template that imports “GameFrameWork/Character.h”

Does anybody know what I’m doing wrong? I’m quite new to UE4 (but ok with C++ using a different game engine)

Any help or tips would be greatly appreciated. Thanks!

Hi,

You can’t override method that aren’t marked as virtual, ReceiveActorBeginOverlap isn’t virtual.

Override NotifyActorBeginOverlap but remember to call Super in your function.

Regards

Piotr

Awesome this did the trick. Cheers mate, ur a star!