In my case, the max age of sight sense is set to 4 seconds. I can see in the debugger that once my character is spotted by a bot, the age of sight sense is being counted, and once it reaches 4 seconds, the sight sense sphere disappears. But how come the function OnPerceptionUpdated()
is never notified of this expiration event? Is this a bug?
1 Like
Workaround
- Subclass
UAIPerceptionComponent
(e.g.UMyAIPerceptionComponent
) and overridevirtual void HandleExpiredStimulus(FAIStimulus& StimulusStore) override
. Put your desired logic inside this function. As an aside, the API documentation mentions that it is not necessary to callSuper::HandleExpiredStimulus()
. - In
AAIController
subclass (e.g.AMyAIController
) constructor, create suboject ofUMyAIPerceptionComponent
.
1 Like