[C++] mouse events not working in the world

I also had some struggle with getting mouse events to be received correctly.

I found that adding the following to the constructor of the class that I wanted to receive inputs on solved my issue:

this->SetCollisionEnabled(
    ECollisionEnabled::QueryOnly
);
this->SetCollisionResponseToChannel(
    ECollisionChannel::ECC_Visibility, 
    ECollisionResponse::ECR_Block
 );

Perhaps a full example of how I set mine up might help to ensure all steps I have taken are also present in your project:

void Example::PostInitializeComponents()
{
    // "this" represents the object where I want to register my mouse over triggers
	this->OnBeginCursorOver.AddUniqueDynamic(this, &Example::TriggerVolumeMouseOverOccured);
}

void Example::TriggerVolumeMouseOverOccured(UPrimitiveComponent* touchedComponent)
{
    // Put a breakpoint here
}