Get Overlapping Actors fails sometimes

I have a project that spawns identical rooms, dynamically when a door is opened. the rooms are connected by an adjoining corridor so, when the door is opened and the adjacent room spawns, there is a corresponding door at the other end of the corridor which also has to open.

I accomplished this by including an offset collision volume as part of the door blueprint. When I trigger the door, it spawn the room then does a Get Overlapping Actors on the collision volume. There will only ever be one door in this location so I grab element 0 from the array and fire an open command to that door.

So far so good but, every once in a while (could be the first door I go through, could be the 20th) The other door fails to open. Debug shows the Get Overlapping Actors array is empty, even though I can see there’s a door there. I’ve been banging my head against this problem for about two weeks now, including redoing the logic a couple of times but the problem persists.

The other day a friend asked me if he could take a look at the story so far so I did a full build and sent him it, with a warning about the “door bug”. “What door bug?” he asked after playing through for a while. At this point I decided to try out the build myself. Lo and behold, every thing is working fine.

So at this point I’m highly confident that this issue is something to do with the editor, rather than my logic which seems to run fine standalone. Is this a known issue and (if so) is there a workaround in editor? I’ve tried sticking ridiculously long delays in between some of the nodes between spawn and detect, just in case the spawn was lagging somehow and the components weren’t registering in time for the detect but nothing seemed to shift it.

I think what’s happening is when you spawn the new room and check the volume, you’re getting the collsion results back just before the new room has properly been instantiated. Hence the empty array.

Timing issues like this can vary between editor and standalone.

Can you try putting in a delay after spawning the room before you check the volume?

As I mentioned, I was pretty much assuming this was the problem to begin with so I stuck in a 10 second delay, in a couple of places. Made no difference.

Sorry, missed that :slight_smile:

Do you wanna put some code here? I’ll have a look…

Whoa! That’s pretty awesome, thanks! Cube Door posted by anonymous | blueprintUE | PasteBin For Unreal Engine

It’s blueprint and pretty heavy at that. Is there any hotkey to dump the whole blueprint to a jpg? Otherwise I’ll have to stitch a whole bunch of screenies together

If it’s one BP, you can just do CTRL-A copy, and paste into a text file and attach it ( yes, that works :slight_smile: ). Or you can use: https://blueprintue.com/

Thanks, man! I’'m just about to head off for the weekend so I’ll be afk til sunday.

Holy ■■■■, that’s a lot to sift though, will take a look in a while…

Well, I’ve had a little look ( and may look a bit more, but there’s a lot ). The main thing I see that might be causing problems is delay on sequence nodes. Basically, can’t be done :-/

The sequence node does fire the pins in order, but there’s two caveats. One is, I’m not sure if it waits for pin1 to complete before firing pin2, that’s not clear. But very definitely if one of the chains contains latency ( like a delay node ), then it will not wait before firing the next pin.

I notice you have a lot of delay nodes scattered around. I have been down this road myself, and in my experience it always leads to inconsistent outcomes. Which is what you’re experiencing.

I think if you code with the delays it will work. Not just taking them out :wink:

Will take a further look though…

As I understand it, the last pin of the sequence is just back to main execution path? So if I have a delay at the end of a sequence it should (and does) work as intended.

I have a couple which do have a variable setting on the next pin but with these I don’t care about when they execute. They just have to get done at some point. It’s delaying the next event on that pin that’s important. This runs consistently and produces the desired result every time it’s executed.

Cheers for the heads up on sequences and delays, tho. If I hadn’t come across this issue already you would have saved me a good few hours banging my head against a wall.