I’m trying to have an object always be looking at the players position like so…
for (int i = 0; i < m_nTrickshotObjects; i++)
{
const FVector PlayerPos = GetWorld()->GetFirstPlayerController()->GetCharacter()->GetActorLocation();
FRotator Forward = UKismetMathLibrary::FindLookAtRotation(ObjectLockIcons[i]->GetActorLocation(), PlayerPos);
ObjectLockIcons[i]->SetActorRotation(Forward);
}
Yet when I compile I get an unresolved external symbol error. I read that UKismetMathLibrary is not meant for general C++ use so how can I access FindLookAtRotation directly?