AI perception update slow already with 20 actors
How to optimize AI perception update to stay fast? When having some near 100 characetrs in pool, I cant find away to prevent it having effect on AI perception update speed. Delay gets around 5-20seconds. When having 20actors the delay is already 0.3-0.6seconds (the debug ball updates with that rate). Tested this in empty map only with the actors. View distances are 5500 at most, and half view cone 90.
I have set component tick off for AI perception component, stopped brain component logic, disabled tick for whole AI controller, but no effect.
If affiliation settings have effect, would need to way to mark wanted pawns as enemies. Also disable wanted pawns to show in perception system at all. All animals are currently showing.
Not using AIPerception component events. Instead having own timers to slowly copy currently perceived actors to variable and then checking it with slow rate.
Is there some more tricks how to get it faster. Would hope to have around 40-60AI at one time without response times getting over human reaction time.
Else having smooth fps staying over 60, so bit lost why it behaves like that.
EDIT: Looks like its only the sight that is slowing down. Hearing is instant.
I don't think, you can have dozens of ai, all tick with perception and other complicated behaviors. Crows have no individual intelligence, but mostly following leader (or "game director").
You need different approach (code solution, no matter bp or c++). For example you can make group leaders, for every 10 or more ai. Only leaders will use perception, others will just follow leaders. However, perception system is as I know obsolete and it will be mark soon if not already.
Would be nice game with 100 characters and they all have sophisticated ai, perception etc working same time, but I don't know game like this, maybe I'm wrong.
Use crowds with leader, and better create own perception system.
In your case, from memory - check perception and/or stimuli update. Maybe is every tick for every ai actor...
Follow this question
Once you sign in you will be able to subscribe for any updates here