I’m spawning a room (ARoom) in the world. Then I set its new location:
//Set the new room position newRoom->SetActorLocation(newRoomPosition);
Now I want to check if it overlaps with another room:
//Check if overlapping TArray<AActor*> overlappingActors; newRoom->GetOverlappingActors(overlappingActors, ARoom::StaticClass()); for (int y = 0; y < overlappingActors.Num(); y++) UE_LOG(LogTemp, Warning, TEXT("[%s] is overlapping with [%s]"), *newRoom->GetActorLabel(), *overlappingActors[y]->GetActorLabel());
But regardless if it overlaps or not, overlappingActors.Num() always returns 0. I have GenerateOverlapEvents enabled (Collision on the static mesh):
What am I doing wrong?