AI Perception sees actor hidden in game

Hi,

I’m experimenting with the AI Perception component. I’ve initially set up a simple detection system with the PawnSensing component and set a keyboard event that toggles the player to “hidden in game” to test out my sensing logic.

For the pawn sensing component this works, but it seems that the AI Perception component does not take the “hidden in game” status of the player into account. The OnTargetPerceptionUpdated gets triggered (with succesfully sensed in the stimulus) even when the player is set to hidden in game. Am I missing some setting or should I deal differently with this?

Thanks!

Try to disable PerceptionComponent of hidden actor’s controller

The hidden actor (the player) has no perception component. The AI just gets triggered when the player is in range, I guess that is something that happens automatically without the player having any perception (stimuli) component.

I looked implementation of sight sensor and saw that bHidden is ignored. There is an interface IAISightTargetInterface with virtual method CanBeSeenFrom which influences in sensor logic. Interface may be inherited but the method CanBeSeenFrom is not available for override from blueprint.

Ah, that explains it than. I guess I have to work around it for the moment, thanks for helping me out on this!

Did you ever figure this out? I’m trying to debug a scenario that would be so much easier if I could just vanish from perception.