I’ve been toying with adding a stealth mechanic to a project and was thinking it would be nice if perception stimuli had a sense config to modify incoming perception attempts. Perhaps this could include things like a visibility radius which overrides the AI controller’s sense or a multiplier of sorts, which modifies the radius of an attempted perception. IE, say the aI has a sight radius of 2000 and the source actor has a .5 multiplier, the AI wouldn’t see the target until closer than 1000. Or to get extra fancy, maybe have an array of distances with a probability value assigned to each so that AI might see the other actor within a certain range.
Obviously there are several ways to fake this now, such as just not adding a stimuli to a blackboard or whatever during a perception update event with some extra logic. Doing it this way however can leave false positives in the sensed actor list which can gum up things like eqs queries when making ai switch targets.
Another trick one can use is to spawn a cloaking actor with a collision sphere set to block visibility which follows a character around. This is a bit hacky though and can lead to awkward situaions where one can be punching an npc in the face without being seen because the perception trace starts inside the bubble.
As such having the perception sytem itself able to tweak the visibility and such of an individual actor would be handy for any game with some sort of stealth or camouflage mechanic. If having recursive distance checks for visibilty overrides is too expensive, exposing perception attempts as a function on the stimuli component which could return true or false to the perceiver based on whatever logic is needed would be nice too.
Or in case I just can’t brain today and such functionality already exists, some documentation would be good.