Perception register/unregister


We’re using the AI Percepcion Stimulus Component in order to allow NPC’s to perceive certain objects.

When we unregister a stimuli from the perception system in blueprint:

OnPerceptionUpdated and OnTargetPerceptionUpdated events do not fire. We made sure that it unregistered successfully too by checking the perceived actors every frame:


. Is there a proper way for us to fix this? Is this bug fixed in a future version of the engine?


I’m fairly new to perception but what I usually do is say I have a food actor and I want NPCs to see it and with some event make it unseen for some reason, so in the food actor I add an AIPerceptionStimuliSource component and in begin event play I call Register for sense and I choose sight and if I want to make it unseen I simply call Unregister for sense and choose sight it works great but not sure if this is how you should do it.

I tried your method just like you the perception events didn’t fire whereas with Register for sense works great and if the actor is unregistered from sense the event fires as expected.

I you got your problem solved let me know of what was wrong since I’m still learning myself, hope my answer helps.

It’s because by default perception has max age = 0 which basically means that it is never forgotten. Set it to a small number if you want to stop sense as soon as its unregistered.

1 Like