GetOverlappingActors doesn't work for actors already inside a volume on level start

On BeginPlay, I want to query a volume and get all of the actors inside it, regardless of whether they were placed there by the level designer or spawned at runtime. When I use “Get Overlapping Actors”, it only shows the latter.

I have checked ‘Generate Overlap Events’ on both the volume and all of the objects in there, and it doesn’t make any difference whether the placed objects are set to ‘static’ or ‘movable’.

Found a workaround, but I’d still like to get this question answered.

I was able to get the volume’s ‘placed’ contents by making them children of the TriggerVolume in the World Outliner hierarchy, then using “Get Children Components” to find the actors I’m looking for.

Not as nice though, as I’ll have to use different methods to aggregate placed and spawned actors. This method will also break down as soon as someone forgets to re-parent an object that has been moved into a different room.

Same Issue here.

Yeah, I’m running into the same issue, though I’m working with spawn points, and trying to get all that are inside the volume so I can have specific areas spawn enemies during an event. What I did was get all actors of class and then do a comparison on there location with the actor bounds.

You could use the start tag property to filter, that’s probably easier than comparing to bounds?

My workaround for overlapping at spawn was to hide the actor after spawn and then show it again, which did the trick too.

After browsing through the code, I found that the current best method is to just reattach the collision component to it’s parent component like so.

This will cause the USceneComponent::UpdateOverlaps() function to be called.

Note that “Attach Type” is “Keep World Position” and “Weld Simulated Bodies” is is checked.

With that said, this seems like a bug and should probably be something that could be addressed when spawning an actor. I’ll look into writing a fix for this and making a pull request.