GetOverlappingActors - does it work!?

I have a simple test BP ( because I’m having collision problems ). It’s just a cube with a collision box poking out the front:

The box is set to overlap all, generate overlap events.

So, WHY, when I put two of them in a level facing each other:

298638-facing.jpg

Do I get this:

298639-output.jpg

Surely I should get two lines?!??!?!

Interesting… What if you make a copy of the blueprint and put the copy in the scene with the original?

Doesn’t work either… :smiley:

Maybe it’s a sign of a really efficient physics engine only having to detect one intersection rather than one per actor.
I haven’t looked at the source code but I would guess all the collision information is passed by reference similar to C#'s out keyword like this, and that goes on to call GetOverlappingActors… maybe, I don’t know for sure.

Meh… sounds a bit ropey to me. It might make some sort of crooked sense in this example, but when you have a lot of stuff going on, you just need to get a list of actors. You don’t need the edited highlights!

I have since replaced it with ComponentOverlapActors, which does work.

I was thinking about this again today, I thought ‘maybe M4g5o is right’… I put 3 of the cubes face to face and asked them to report how many overlaps they were getting.

I got:

Cube1: 1 - ok logical, maybe

Cube2: 0 - could accept this if somehow cube1 had ‘consumed’ the hit

Cube3: 4 - !?

I think it’s a node best avoided… :slight_smile:

I just tested both GetOverlappingActors and ComponentOverlapActors, neither had any issues.

298810-overlaps.png

Ah, I had a class specified in my getoverlapactors. ComponentOverlapActors and ComponentOverlapCompoents do work, that’s for sure.

Here you go:

I get one line printed…

GetOverlappingActors is a little peculiar, it doesn’t ignore parent components and it seems to update slower than ComponentOverlapActors, I would’ve thought they both update on the physics framerate.

You mean like this?

wtf? I don’t get it, we both have the same BP… ( and 4.24.3? )

I even took out the arrow and mesh. I have the same thing as you and it ain’t working…

Ok, got… bbblllleeerrrrhhhggggg, it’s not catching begin play quickly enough.

If I trigger the test with a keyboard stroke, it works. Really?..

I’ve got NOTHING else in the level.

Please convert it to an answer :slight_smile:

I’m using 4.17.2, also Initial overlaps aren’t populated by BeginPlay in 4.24, fixed in 4.25 5 days ago.

I’m using 4.25.4, but still facing the same problem.

It’s not going to go away ( overlap not working on begin play ).

I seem to recall I ended up being much happier with ComponentOverlapComponent ( or something like that )…

Alternatively use a Delay after BeginPlay and set the Duration to delta.

I just tested it with triggers and it worked, sleeping rigidbodies are usually the culprit for not triggering. Also it seems overlaps are found on BeginPlay until an Overlap event is created, then BeginPlay stops finding them.