AI Perception performance


We have implemented the AI perception system in our game and so far everything works pretty cool and is exactly what we needed, thanks for that!

In order to be ready for the future I was wondering how would be the best way to enable/disable senses on certain actors. For example I want to disable the sight sense for an enemy that is not within a sensible range of the player.

So far we haven’t seen any performance issues but would like to identify some areas of improvement (in case we find them :slight_smile: )

Thank you very much!


Hey Andres,

The easiest way to disable a sense would be by calling UAIPerceptionComponent::UpdatePerceptionFilter. The function is mis-named, since it’s working on a white list rather than a blacklist. Also, the function is protected :confused: I’ll add a public, properly named function in 4.11. In the meantime just make it public and give it a try. Let me know if it worked as you expect.



Hey Mieszko,

That worked perfect :). I think right now i can do almost everything.