UpdateOverlaps freezes UE4 (Spawning actor)

Actor spawned and game freezes for several seconds. It happens after a while (3 minutes of game with five players).

I profiled my game and got this:

This character spawned after login to game at spawn point.

Also on map there are over 9000 actors (with overlap event; if this info is necessary).

What’s wrong with it?

I’m experiencing a similar issue, would love to know if there is a solution for this.

For anyone stumbling across this.

That’s a lot of actors you’ve got. Usually UpdateOverlaps takes a long time if you have a lot of complex collision meshes in the scene. Check that you’re not using Complex As Simple collision and that your collision meshes are not too big.

UpdateOverlaps basically queries every mesh in the scene against yours. In my testing it didn’t really matter if you’ve got ignore collisions on all collision channels and overlap only one. It seems like it still did the full overlap query for everything, and only then is the filter applied. The fix I went with was simplifying collision meshes and got my update overlaps call from ~50ms down to 0.2ms.

1 Like

Solved by bottomMesh->SetCollisionEnabled(ECollisionEnabled::NoCollision); version 4.27.2