Is there a limit for AI perception ?

Hi,

I noticed that when I have let’s say 100 AI in the map the perception stops or become delayed for certain AI, It’s not a max agent limit issue, I already have that high and they all walk around just fine.

I can set their chase target at begin play and they will all follow the player just fine, but relying on perception it doesn’t trigger for some of them or it’s delayed.

Here’ a quick test, this is with 68 on the map, perception radius is 3500
The perception is delayed by a few seconds

This is with 20 AI you can see how the perception reacts instantly

Is there a config or setting somewhere that controls the perception tick rate or something like that ?

Any info is appreciate it, thank you.

What engine version are you using?
What perception sense are you talking about ?

I tested it in 27 and 5.1 and got the same result.
The sense is sight.

Hi, yes there is a limit of work that the sight sense does per tick (since every actor would need to trace to every other actor in its range, which can add up to a lot of traces very quickly, so the number of traces it does per tick is limited). And it also prioritizes by distance.

So you could increase the amount of traces it is allowed to do in the DefaultGame.ini, e.g.

[/Script/AIModule.AISense_Sight]
MaxTracesPerTick=60

which ofc will cost you performance. And/or you could implement the team sense and only detect hostiles, or if you only want to detect the player with the sight sense you could also disable that pawns are automatically registered and then only register the player to the sight sense.

2 Likes

Thank you for sharing the knowledge, I appreciate it.

Sorry, I was reading that because I’ve the same issues but in my DefaultGame.ini there isn’t that option there is only the name of the project why that? I’m working on 5.1