GetOverlappingActors() not returning actors that are moving with SetActorLocation()

I have a box-shaped actor that is spawned in my game, and on its first tick, it calls UPrimitiveComponent::GetOverlappingActors() on its UBoxComponent. If it overlaps the player pawn, it destroys it.

It works as intended if the player’s pawn has not moved that frame, but if the pawn has moved, the GetOverlappingActors() function does not include the pawn in its returned array.

The player pawn is moved using AActor::SetActorLocation(vNewLocation, 1). The documentation doesn’t have many notes on GetOverlappingActors. Is this a bug?

So I was browsing the AActor documentation and found two functions, “UpdateComponentTransforms()” and “UpdateOverlaps()”. I added these two functions after my pawn moves and this seems to fix the problem. If I had waited like a few more minutes I wouldn’t have had to post this dumb question, but hopefully someone else who has the same problem will find this post useful.