The location of the DefaultPawn is equal to the location of the Player view point.
This is tested by the following codes.
void UGrabber::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);FVector PlayerViewPointLocation;
FRotator PlayerViewPointRotation;AActor* ThisOwner = GetOwner();
FVector ThisOwnerLocation = ThisOwner->GetActorLocation();GetWorld()->GetFirstPlayerController()->GetPlayerViewPoint(PlayerViewPointLocation, PlayerViewPointRotation);
UE_LOG(LogTemp, Warning, TEXT(“The %s (At %s) is looking at %s and turnning at %s”),
*ThisOwner->GetName(),
*ThisOwnerLocation.ToString(),
*PlayerViewPointLocation.ToString(),
*PlayerViewPointRotation.ToString());float Temp = 0;
}