GetPlayerViewPoint or PlayerCameraManager?

In this time, to get StartLocation(2nd arg of LineTraceSingleByChannel function), Ben used

PlayerCameraManager->GetCameraLocation();

but I used

FVector PlayerViewpointLocation;  // Out Param
FRotator PlayerViewPointRotation;  // No use
GetPlayerViewPoint(PlayerViewpointLocation, PlayerViewPointRotation);
FVector StartLocation = PlayerViewpointLocation;

So I looked up Engine Source(Runtime/Engine/Private/PlayerController.cpp)

And I found that maybe it is same depends on conditions(?)

Is it correct?? :thinking:

1 Like

Privacy & Terms