In this case the pawn that the AI is trying to see is the player character. Apologies… it is playerPawn as shown below - I used shorthand. This is in a B-Tree Service node component.
Now I have determined:
A) the player pawn is always found . Player pawn is set at the beginning of the tickNode method as:
APawn* playerPawn = UGameplayStatics::GetPlayerPawn(GetWorld(),0);
A log statement under that fires if the pawn does not have a value (that log statement is never seen - the if always evaluates the playerPawn as having a valid pointer)
B) the AI Controller is always found. There is a line that states:
if (OwnerComp.GetAIOwner() == nullptr)
that will then log out the ai owner was not found and then return out.
In both of these cases we always have a player pointer, and we always have an AI Owning Controller on the object in question.
However LineOfSightTo(playerPawn) always returns false even if player Pawn is standing right next to the AI pawn.