Hi I’ve tried to find out how to handle a simple click on an Actor. I have a player controller with this (default) constructor:
AMyPlayerController::AMyPlayerController(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
bShowMouseCursor = true;
bEnableClickEvents = true;
bEnableTouchEvents = true;
DefaultMouseCursor = EMouseCursor::Crosshairs;
}
so the bEnableClickEvents is set. I also checked if this is indeed the player controller that is used.
In the actor (which has a basic cube as the root object) I add in the header (public) a
void ReceiveActorOnClicked();
and in the c++ file I define the function and print a log message. But it is never fired. I run the game in the editor (that worked with mouse clicks right?)
I can’t find out what I’m missing. Can anyone help me out? thanks!