Detecting overlapping actors on begin play

I’m trying to detect overlap on BeginPlay node, however, all functions about checking overlap are not working as expected.
It was reported as a bug, UE-86045, and marked as “Fixed” in 4.25.

I’m using 4.25.4, but still produce the same result as this topic.
Any workarounds?

I believe there is a node somewhere that says “get overlapped actors” or some similar wording that you can use. It gets all the currently overlapped actors.

If it specifically isn’t working on begin play for some reason, you could try adding a delay node for .01 seconds or something and see if that helps it.

1 Like

If I add a delay node, it works! Just want to make sure that can this method guarantee it works? And why? Thanks.

1 Like

Occasionally, adding very short delays in front of some actions will make them work when they weren’t before. I do not know enough to know for certain why, but I suspect it has something to do with the order in which the engine loads or creates things.

In this case, I suspect that the engine created your actor first and so when its Begin Play fired, none of the other actors around it existed yet. The delay would give time for others to load (.01 seconds is quite a long time in computer time).

Regardless of why it works, now you know it does work. :slight_smile:

2 Likes

In my case the solution was using bGenerateOverlapEventsDuringLevelStreaming

I had to enable it only in the interested actors and now the collision events work even on BeginPlay from the respective actors (without calling GetOverlappingActors)

3 Likes