Quick set-up of a basic actor in c++, including the on component overlap event.
Overlap declaration:
UFUNCTION()
void MyOverlapFunction(AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
Hit Declaration:
UFUNCTION()
void MyHitFunction(AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit)
How to bind overlap:
MyPrimitiveComponent(Point)OnComponentBeginOverlap.AddDynamic(this, &AMyActor::MyFunction);
How to bind hit:
MyPrimitiveComponent(Point)OnComponentHit.AddDynamic(this, &AMyActor::MyFunction);
Note using (Point) as it won't allow greater than or less than signs in description.