There’s only two possibilities:
- You don’t have the data properly setup (Make sure Generate Overlap Events is turned on for BOTH actors - if one has it on and one has it off, the system ignores it).
- Your query is located in some odd place and thus not hitting anything.
See Collision Overview | Unreal Engine Documentation
A third option is to skip the query entirely and just use an Actor iterator and a simple distance check.
const float distanceSquared = 10000.0f * 10000.0f
const FVector CenterCube = GetWorldLocationOfCubeCenter(CubeToRemove);
for (AActor* Worker : TActorRange<AActor>(GetWorld(), WorkerClass))
{
if (FVector::DistSquared(CenterCube, Worker->GetActorLocation) < distanceSquared)
{
// Do stuff.
}
}