Get Overlapping Actor not working 4.14.3


Let me first vent out some steam. Yesterday a project i have been working on for quite some time apparently got corrupted, and crashes the editor the moment the project loads. I must have made some change that caused a bug in that project while i searched for a solution around another bug when i tried to add a simple widget (Just an image with a background) to another widget, which is too much of a daunting task for UE to handle and causes a REINST error.

Now i am starting all over, which despite my current rage i try to see as a good thing, to make things even better and more clean in this project due to what i have learned during the corrupted one.

But guess what, while working on the first pieces of code, another bug seems to annoy me now.

I spawn some floors and walls, and need the newly spawned walls to delete the ones that they replace.
To do this i use “Get overlapping actors”. However no matter how i turn this around, it returns an empty array of actors.

Here is the small piece of code that doesn’t seem to be working.
It doesn’t matter if i change from checking a primitive component to actor. The spacer’s collision is viewed to the right.
I have tried setting it to overlap all, without success.
I have also tried not setting the overlapped actors array as a variable and plugging it directly into the for each loop.

Here spacers are set to visible, and as you can see some of these walls are currently overlapping.
But it doesn’t print out any “Objects” which only can be because the array is empty.

So the new million dollar question. Why does this happen. Is it a bug, or have i gone blind and overlooked something simple in my fury?

And is 4.14 in general a poor version to use, since i have never have so many problems creating relatively simple features, and is insanely annoying that i seem to spend more time on bug solutions instead of making an actual progress with my projects?

Oh, and before you give a standard answer. NO, i am not interested in trying to recreate yet another bug in a new project. I want to fix this and move on.

Sorry if i sound too grumpy. I love working in UE, but this recent string of bugs, followed by a corrupt project is severely testing my patience.

Hey Fjordhoj,

So I’ve created a simple setup in a clean, FirstPerson project. Here’s what I did:

  1. Created a new actor blueprint
  2. Added a cube mesh for visibility and a box collision component
  3. On Tick, Get Overlapping Actors for the Box Collision component and then print the display names on a ForEachLoop
  4. Place the actor in the level
  5. PIE

After doing this, when I ran into it with the character it printed FirstPersonCharacter as expected.

It could be possible that your collision component is not large enough to reach past the mesh bounds, and as such it is not actually overlapping the box collision (I can’t really tell if this is the case based on the screenshot). Try expanding it to be twice the size just for testing to see if this allows it to register the overlap.

I recommend performing some debugging on your setup. Something like checking to see if the Array’s index 0 is a valid index to see if there is even anything being stored in the array. The best debugging tool in my experience is attempting to create the setup in its simplest form, i.e. simply getting the overlapping actors and printing their names. Then, once you have that working you can add complexities to your logic.

Let me know if you’re able to find anything out by performing some debugging tests, and don’t worry, we’ll get it sorted out and get you back on track.


Thank you for your reply.

The length of the array with overlapping actors is 0. The collisions aer overlapping, and i also tried to make them double size. Same results. So it’s like it doesn’t recognize anyhting overlapping at all. When checking what overlaps “self”, array length is also returned as 0.

Do me a favor and try setting your Spacer component to the root component of that blueprint to see if that causes overlap events to generate.

Have you tried creating an overlap setup in a simpler form as I suggested? Meaning basically just a blueprint with a cube and a box collision that is set to overlap all and generate overlap events?

Since I’m not able to reproduce it on my end, I’m not sure that this is a bug, but I’d be glad to take a look at your project if you’d like to zip it up, upload it to Dropbox, and provide me with a link so I can see your setup and see if I can resolve the issue.


Hi Sean

I tried as you said, to change spacer as root. Didn’t work. THen i tried to make a new object with box and collision, and copy code. Arraylength was still returned as 0.

Then i tried to execute it with EventBeginPlay, and suddently the arraylength was different from zero, which seemed odd, since the custom event that was used before was run as the next node after spawning the object with this object as the target, so i can’t see what the difference should be.
I changed this to the original object, which made it work too.

With a bit of fiddling around, it seems that calling this event just after creation was too fast. I had to create some delay timers after spawning, and then call the event.

I thought that when “Spawn actor of class” was run, the object would be ready for use apparently after?

Anyhow, thank you very much for your responses and solutions :slight_smile: