AI SightPerception not loosing sight

Hi,

I’ve been working with Perception Component. I’ve got the perception component in my AI Controller and the AI Controller has possessed the bot.
Perception component Sight correctly spots the Game Player but it doesn’t seem to be loosing sight of it.

I’ve tried various things, changing max age, Auto Success Range nothing seems to make the bot loose the Game player.

My AI Controller is a C++ and I’ve put something like this just to log out the perceived actors:

PerceptionComp->GetKnownPerceivedActors(UAISenseConfig_Sight::StaticClass(), SensedActors);
	UBlackboardComponent* BlackboardComp = OwnerComp.GetBlackboardComponent();
	const FName TargetKey = "TargetActor";
	for (AActor* PerceivedActor : SensedActors) {
		UE_LOG(LogTemp, Warning, TEXT("Actor Perceived: %s"), 
PerceivedActor->GetName())

I keep seeing the actor name in the log and also see the actor set on the blackboard.

What I was thinking to do was if I don’t find an actor in the knownActors then I could unset the blackboard key, but the code never gets around to that part as I constantly get perceived actor.

I would really like to know what’s going on and / or there is a better way to do this…

Thanks,

PerceptionComp->GetCurrentlyPerceivedActors(UAISense_Sight::StaticClass(), SensedActors);

This works well for the purpose.