Two AI and one door to the labyrinth. How to solve who should enter?

Hi there. I have labyrinth with 1 enter. The problem is when i enter to the labyrinth, 2 AI cover me. If they are on same location from me, then they resort simultaneously to the enter of the labyrinth. After that UE 4.19 freezes. I think the problem is that the entrance to the labyrinth is very narrow, only 1 AI can enter it at one time, but since there are 2 AI at the time of the entrance to the labyrinth, none can enter, because there is too narrow. How can we solve this problem? Do not offer to increase the entrance…It is not a full solution of this problem.
Upd Do you need a video? I can try to record a video with a problem…

I guess you could do a check on if there are other AI nearby and get an array of that and rank each by random for priority. The others would wait until the doorway is clear before checking again until everyone is through.

Either way I think you will need some sort of enter door action/state so you know when it happens and can fix it in whatever way.

Ok thank u for answer. I think it can solve my problem, but has unreal engine got any built-in function for solving this problem? Something like rvo avoidance?

Not that I know of I haven’t done much with AI.

Or you can on overlap or a line trace to door and out of the hit result get from time and compare it to the other ai’s time thru AI controller. if time is < less than other AI time than the AI with less time of hit go’s first. Hope give’s some light to your situation. :slight_smile:

yes there is avoidance built into the engine. i dont remember the exact name but theres a detour crowd controller management system. its something that you have to enable but theres a bunch of videos and docs out there on the topic.