AI Perception - Break AIStimulus should have the type of perception included

EDIT: I did find the Get Sense Class for Stiumulus function, which resolves this in part. I still believe it would be helpful to expose the sense class in the Break AIStimulus function in blueprints.

When breaking out an AIStimulus from the OnTargetPerceptionUpdated event there is not an option to determine the sense used for the given Stimulus. It seems intuitive that the sense used to detect the stimulus be included since there are multiple perception types, as one may want to have some control over how each different sense should be handled per perception event.

In my case, I have an AI using two senses (hearing and sight). I will be implementing greater control over how sight perception is handled. For example, when a sensed actor is within sight range I would like to have the AI ignore the actor if it is not moving and not making any sound. It would be helpful to know which sense triggered the stimulus, but that is not included in the Break AIStimulus function in Blueprints. I think I have a work around to get the information using Find Perceived Actors function and filtering by sense class (which indicates to me that the data is there just not exposed to the breakStimulus function). It would be so much easier if the Stimulus itself had the sense incorporated directly so that when breaking the AIStimulus it was one of the items found.

Also, if by some chance there is a way to directly weight the sight perception value being calculated based on some custom criteria (such as movement speed) please let me know (I highly doubt there is). Since weighting would occur during perception itself prior to its being reported as a stimulus it would change my approach entirely.

Hello,

I have entered a feature request for the addition of a Stimulus Type pin to the Break AI Stimulus node (UE-26444). Thank you for your suggestion.

Have a great day

1 Like

Any update on this ?
EDIT: I found the “Get Sense Class For Stimulus” node. It takes the AIStimulus struct and returns a Class. I then test if the class is equal to AISense_Sight, AISense_Hearing, etc.
This is a workaround for me.

1 Like

Thank you for sharing the workaround. At this time, there hasn’t been any update on the status of this request.

1 Like

Almost shocking that after 5 years this still isn’t considered something that we might need to know. At least there’s a workaround, even if it is leaning on the hacky side.

1 Like

I’m from the future, still not perception type included, an enum would be great to handle the behaviors with a switch case instead having 5 “IsClassEqual”