AI Perception Stimuli Source simply not needed?

Hi chrudimer,
thank you for your reply. Your hint about pawns getting automatically registered did finally lead me into the right direction.

If I add a stimuli component with no configured senses, the blueprint function UnregisterFromSense allows to unregister for the (unconfigured but silently registered in the background) sight sense - works perfect. Interesting observation: A UnregisterFromPerceptionSystem has no effect, while I would expect this function to be even ‘stronger’… - but at least I believe I now know, how to handle things.

Some more interesting experiment: Adding to DefaultGame.ini as found in this thread

[/Script/AIModule.AISense_Sight]
bAutoRegisterAllPawnsAsSources=false
bAutoRegisterNewPawnsAsSources=false

Once having this configured, it behaves like expected: no sight sensing happens unless the character has a StimuliSource along with the Sight sense configured. Things would be far less confusing, if this would be the default setting in the engine. At least, this should be clearly documented.

For the hearing sense, as you told, this is event driven. While this makes sense, it is really confusing, why this sense is available at all for stimuli configuration, if that configuration is completely ignored afterwards. Trying this one in DefaultGame.ini as well:

[/Script/AIModule.AISense_Hearing]
bAutoRegisterAllPawnsAsSources=false
bAutoRegisterNewPawnsAsSources=false

As expected - this just does not have influence.

I still would consider this as a bug: if I add a stimuli component and do explicitly not configure a sense, why does the system simply ignore this and register these senses silently under the hood?

Also having options available to be set and configured, it is at least extremely confusing, if these simply get ignored later on.

BTW: As for the hearing sense, I wish there was a functionaltiy not being event driven by separate make noise function, but instead driven by playing a (looping) sound cue. Let’s say chicken running around and a fox can hear them, until I use Set Volume Multiplier to make them quiet, so that the fox cannot detect them any more. Having a permanently monitored hearing sense like sight would be really helpful. But that’s another story, I will experiment with this…

Thanks a lot for pointing me into the right direction.

3 Likes