Hi,
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.
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’.
Sorry, old post but I have been looking into a solution to this and might have to turn to C++ to solve this issue. What you have stated is 100 percent true, and I have used the already built AI Perception system/config to create a more advanced AI Perception system that includes peripheral vision and direct Line of Sight. It uses the config defaults and then uses other tools/values to determine whether or not the player is in peripheral vision or direct LOS. This is great and all of the values for Peripheral vision detection and direct LOS range are all publicly exposed and can be changed on various instances of Controller Owner’s BP class. However the base config remains the same for all instances so while I can tweak one instances Direct LOS range/size or peripheral detection sensitivity I can’t tweak the base config that all of these values are contained within. With your advice, yes I technically CAN create a whole different set of values to control/override the base config, doing so will further convolute my functions and make things unnecessarily complex when it would be much easier to be able to tweak the base config amongst instances.
Sorry, not trying to come across argumentative, as what you said is 100 percent true, though I have already sort of done this to create and build my own more featured detection system on top of what has been provided. Already found a lead on what needs to be modified in C++ to fix my issue but being able to change the AI Perception config in BP would make things way more efficient. Not trying to change things at runtime per se, but in order to modify the perception config amongst different Pawns/Characters using the same AIC