AIPerception dominant sense has no impact

Hi @Mieszko,

Running epic/master and considering the following BP EventGraph on an AIController:

Two senses are configured: AI Hearing and AI Sight; order they are created in the AIComponent does not matter it seems as it has no impact. Dominant Sense is either not set; it’s set to Hearing; or set to Sight.

In any of the Dominant Sense cases, when Actor Perception Blueprint Info is iterated over and sense class name printed for index 0, it always returns Sight, no matter what sense is really active/last stimulated.

I believe this to be a bug or unintended behaviour. The Last Sensed Stimuli array should return in index 0 the sense that was last stimulated, which is not the case, at least not with Blueprints.

Either the array is not ordered in correct age order (Last In First Out); or the Sight takes precedence over Hearing regardless of the Dominant Sense configuration; or Hearing lags behind Sight

Actually this last one (Hearing sense lagging behind) seems to be the case almost always, as it does not appear to be detected/triggered all the time for me.

EDIT: Forgot to mention, when I trigger Hearing from my character, the AI still detects Sights even though I am not in the line of sight or visible to the AI at all.

Thanks!

@Mieszko,

Any comments or ideas about this?

Thanks.

It seems there’s a bug in AIPerceptionComponent that results in information about dominant sense never getting processed and all derived data doesn’t get set. I’ll file this as a bug.

Last sensed stimuli has fixed indices so that, for example Sight is always index 0. I say “for example” because it’s game-specific and depends on your setup. In general stimuli arrays are indexed with “Sense ID”. These are not usable in BP yet.

Regarding hearing lagging behind: this can be a glitch related to “speed of sound” feature I have in hearing sense implementation. I’ll have a look.

Thanks for taking your time to report this!

Cheers,

–mieszko