Hi, i have made an custom component and added it to an Actor. But how do i access the BeginCursorOver function from my custom component?
Each AActor has some events you can attach a callback function to. This function will be called when the event occurs.
Here you can find some more details about event handling/delegates:
It boils down to adding a function to your component:
UFUNCTION()
void myBeginCursorOver(AActor* OtherActor);
and register it (in your constructor for example):
OnActorBeginOverlap.AddDynamic(this, &YourClass::myBeginCursorOver);
Donβt forget to activate mouse events in your PlayerController (bEnableMouseOverEvents = true)
Thanks a lot mate, works perfect now!