Hey there git a little problem here,
every time i delete the code in the Tick of ShooterAIController:
APawn *PlayerPawn = UGameplayStatics::GetPlayerPawn(GetWorld(), 0);
if(LineOfSightTo(PlayerPawn)) { GetBlackboardComponent()->SetValueAsVector(TEXT("PlayerLocation"), PlayerPawn->GetActorLocation()); GetBlackboardComponent()->SetValueAsVector(TEXT("LastKnownPlayerLocation"), PlayerPawn->GetActorLocation()); } else { GetBlackboardComponent()->ClearValue("PlayerLocation"); }
→ and replace it with the Blackboard Add Service (Set to Player Location, Blackboard Key PlayerLocation) under the Selector, like suggested in the tutorial → my AI looses the skill to focus/aim. I replaced the “Set default focus” (under Can See Player?/ Chase)mutliple times and its linked to PlayerLocation as blackboard key. Doesnt work this way. Placing back the Tick in ShooterAIController and deleting the Updateplayerlocation gives the focus ability back. Some solutions in the internet suggested reparenting the controller and stuff, but doesnt help for me. Any ideas? Thanks in advance