AI Perception needs more options for Blueprints

I found that AI Perception for blueprints missing some main elements in blueprints like changing the AI Configs(which I believe is very important in gameplay, for example, if you are stealth, decrease the enemy radius) in blueprints at runtime. Also simply having some ticks or nodes to set the teams for detection by affiliation. I tried creating multiple AI Perception components and simply switching between them by Set Sense Enable node but it’s not working on my end. AI Sight Radius remains fixed and not changing in runtime with this method. I know many blueprinters are waiting for these features exposed in blueprints too. It will be very nice to see these things I mentioned in the next updates.

Thank you for your hard work Epic.

I totally agree.
I would like to see options to detect an actor by a component or bone selections.
Instead of just detecting the whole actor. Its just not very good like it is

But once the character is detected you can create a function to decide if it really has to be detected, it’s not something that has to be at the base of the detection that has to be the most optimal.
You can look at the distance, or if it has a component or whatever you’re asking for

In my opinion an NPC AI should not be dynamically modified when the player is in a state like Stealth. Imagine you are playing a multiplayer game, how do the NPCs respond if you are in stealth but another player is not? It is simply not the task of the NPC to alter itself for another actors need. Currently you can get the perceived actors which is usually sufficient, as anything like a team affiliation or stealth mechanic is a bit too specific for a general framework (I think) and should be implemented on top of the existing actor perception?
I suggest creating an ActorComponent for actors which require “team” logic. When the AI perception updates you can check it for any actors that have this ActorComponent and ask for its team, resulting in an array which could be a friendly team or enemy team. Another approach is to implement a blueprint interface for the same purpose, it depends on the complexity you need.


I see when you’d want to know which bone is visible, this would be useful in shooters where NPC’s can’t simply shoot at the center of the actor (which many games do!) as it would result in exploitable behavior. Although it is possible to request the bone positions from a skeletal mesh after getting its actor, it might not be optimal. I haven’t checked how the AI traces such a visibility check. You can however in such a case in blueprints do a line trace to all bones of the target skeleton starting from a point like a rifle muzzle, and break at the first ‘hit’.

1 Like