I am in the process of moving my perception logic from my pawn to the AIController. I have it working fine on the pawn, but getting an error when I try to add a second sense when I came upon this.
I think the second line of this code wipes out the results of the first? I use the second line in my pawn where it works. But only the first line in my AIController.
aiPerception = GetAIPerceptionComponent();
aiPerception = CreateDefaultSubobject<UAIPerceptionComponent>(TEXT(“AIPerception Component”));
Trying to figure out why I get an accessviolation in the AIPerceptionComponent.cpp when I add the second sense.
PerceptionComp->ConfigureSense(*Sight);
PerceptionComp->ConfigureSense(*Hear); <—triggers the error.
This post helped me get on the right track.