"Get Overlapping Actors" always returning empty list

Denisiss

Hello everybody,

This is my first ever post here.
I am currently facing an issue that I cannot seem to get my head around.

First, some background:
I have a blueprint called BP_ItemRackPool. This blueprint contains a multitude of StaticMeshComponents that have a specific Tag (This is so that I can spawn them whenever I need). Screenshot attached.

These items “overlap” here already because I plan on making them “random”. So, at the beginning of this blueprint’s creation, a shuffled for_each_loop will be parsed with a 25% chance of spawning each item.
The issue is the following: there is the good potential of 1 object spawning “inside” of another.
To avoid this, I made it so that all my objects will initially have “No Collision” set. Screenshot attached with ALL StaticMeshComponents selected (Player won’t step on the item, don’t worry)

At function call, which in this case is the start-up, we begin the Initialization part of the ItemRack based on their tag (The tag part and the 25% part work).
I’ve attached screenshots of the blueprint flow.



If the “flow” passes the 25% check and the tag is the tag we want, this item will set it’s collision to “Enabled” with the idea of checking to see if there’s another object already there. If there is, then we disable again the collision and go on in the flow. If there isn’t, then we “unhide” these objects aka “spawn” them.
Issue is, the “Overlapping Components” and even “Overlapping Actors” (with our without GetOwner) ALWAYS, and I mean ALWAYS return 0.

I would really need some support here. I feel and I am certain I did something wrong/overlooked 1 thing, but I can’t figure it out.

Note: The Static Meshes of the Static Mesh Components have all been set to “Collision Preset = Custom…”; “Collision Enabled = Collision Enabled”; “Object Type = WorldStatic” and Overlap box checked.

Thank you for the read and I hope you have a good day!

Just quickly reading through and looking, I wonder if “Get Overlapping Components” would even work if “Set Hidden In Game” is still true. It seems like if it is “Hidden in Game” then collisions wouldn’t occur, even if it is set. Maybe try setting it to be visible before getting overlapping components and see if it results into something different?

Edit: I don’t think this will change anything; I’ll dig into it a bit deeper for you.

Have you double checked that each of the static meshes have a collision mesh?

That I have not, but I do have some of these Static Meshes along the map and the player does interact with them (by not merging/walking into them). I will check and update here if I find something

Yup… low and behold, the solution is always that simple.

*Edit: It was only 1-2 meshes that did not have proper collision set up. This is why the problem was hard to spot, as all others meshes were fine.

For people that might run into the same problem in the future:
Check the StaticMesh of your Static Mesh Components and check, at the top, for “Collision”.
Try and add a simple box collision if there isn’t one.

That fixed it. Thank you @Sklor