GetCurrentlyPerceivedActors() return all sense value when one is specified

I have a character with 2 senses configured:

  1. Sight
  2. Hearing

When I call the function GetCurrentlyPerceivedActors() and specify sight, I also receive the actor from hearing:

TArray<AActor*> SeenActor;
Owner->GetPerceptionComponent()->GetCurrentlyPerceivedActors(TSubclassOf<UAISense_Sight>(), SeenActor);

I’m I doing it wrong?

Hi, try UAISense_Sight::StaticClass() instead of TSubclassOf

If you input something invalid for the class, then it will return the currently perceived actors from all senses.

1 Like