You guys can run more than 20 AIs at a time? Been asking around and everyone pretends Character Movement is the best thing ever and telling me to remove function calls from my tick events when I don’t have anything running on tick. Even with no AI my own character lags if you move around too quickly for more than 10 seconds.
well helped in 2024 too
For basic ai where youre not using a behavior tree, you can remove all char movement components
/pawn sensing and add a set timer by even at begin play. Have this timer do the same thing as “onSeePawn” for enemy AI. The update time on the event timer is comprable to tick, however you can update at something way more performant like .5 seconds and still see pretty smooth action from the AI. Assuming that this is basic AI without blackboard and b(x) tree, this method is way more performant. The other large problem here is spawning AI. This requires an aggressive amount of resources and is better acomplished by having the enemies already stored in an array so they are already loaded in. Ive yet to perfect this but the timer by event saves a lot of performance by itself.