Guard Device AI breaking / ignoring patrol settings?

Hey! Newer UEFN user here. Recently I’ve been trying to make a PVE game that heavily relies on the Guard Spawner device, and most of the time the game works okay! But sometimes when I enter “Game Mode” to test it, certain Guards that I have set to stand in position (E.g. to guard something) just… Break? Sometimes they’ll just walk forward aimlessly at a wall, not only breaking the No Patrol setting but also not even attacking the player. I can’t seem to find a reason for this or a good workaround (aside from enabling Patrol on certain stationary guards and giving them a very low patrol radius, but that doesn’t always have the desired effect I’m looking for) nor can I replicate this in every run. Ideally I don’t wanna launch a map with guards that may or may not work every time.

Is there anything I’m doing wrong / any workaround I could learn with Verse or is this just engine jank I’m stuck with?

Thanks for any and all help in advance!

1 Like

That’s bad, I’d say that this is something they need to fix, but since you don’t have a repro, it could be weird to report too

To avoid patrolling I’d tell you to try applying low speed movement modulators on the guards (not sure if that works)

But for guards being not able to aim, this is another problem, maybe try to understand what they’re trying to do, does it happen on all the guards ? Are they trying to reach somewhere ? Did you try to visualize the navmesh to see if anything is wrong ?


(navmesh debugging option in Island Settings)

Are you using World Streaming also ?

1 Like

After many attempts today, the only time the bug managed to reoccur was when I had debug off. With Debug Navigation enabled, the only paths it showed me were how the NPC in question could mantle and move down, but I haven’t found any other reason for it breaking the No Patrol rule in question. I’m planning on trying to modulate the speed, as you suggested.

I also currently do not have World Streaming enabled!
Link to a clip of the issue

Since there seems to be no logic behind the actions I’m inclined to believe it is just a bug with the device :sweat_smile:

1 Like

It’s definitely not just a bug with the device since it doesn’t happen to everyone, I can see that your minimap is blue on the clip, do you have the navmesh generated on an ocean ?

Also is it possible that the guard is trying to go through that wall to reach a destination ?

I’m not entirely sure what you mean about it being generated over an ocean but I think the answer is no? The room the guard is inside of is above a Grid template [Photo of the outside]. There is an ocean below that though!

It’s unlikely the guard would be trying to get through the wall for a couple of reasons ;
A.) I have not used any custom pathing so far, so there would be no location the guard could be trying to reach
B.) It doesn’t always break the same way. In the clip, the guard went down the stairs and began hugging the wall, but I’ve also had him mantle off the railing and walk into a different wall.
C.) The navmesh doesn’t give me any indicator that he would be going somewhere specific (although I am an amateur so I could be getting an incorrect read). It seems to show where he could go, but he isn’t supposed to anywhere – and when he does, he doesn’t do it like the other guards do. His movements are more restricted, as you’ve seen, and he doesn’t attack when aggro’d [NavMesh Photo]

This part is speculation, but I’ve only seen this AI-break happen when the stationary guard is above the player. Is it possible that the pathing gets confused when the player that alerted it is directly below it? It’s one of the only theories I have

1 Like

If you see the same grid as this one but a blue one over the ocean, try to disable “Can ever affect navigation” on the ocean/water. I noticed some lags due to that in the past

I checked and the NavMesh is not generated on the ocean, and “Can ever affect navigation” is already turned off, so I don’t think it’s that

There is NavMesh enabled on the grid base below however. I’m not sure why the AI would think to go there but, but I did disable that just in case for some reason the Guard got broken trying to get down to the grid floor? I suppose I’ll keep testing this room and update this thread again if this doesn’t fix it

1 Like