Check out example codes for "how to get the player view point location and rotation in ue4 c++". It will help you in understanding the concepts better.

Code Example 1

#include "GameFrameworks/PlayerController.h"


void YourFunction(int32 yourargument)//note: The return type and the argument tupe is assumed. You can change it to whatever you want.
{
	FVector PlayerViewPointLocation;
  	FRotator PlayerViewPointLocation;
  
  	APlayerController::GetPlayerViewPoint(OUT PlayerViewPointLocation, OUT PlayerViewPointLocation); //Note: You can also use GetWorld()->GetPlayerController()->GetPlayerViewPointLocation() but you have to include the file given above.
  	
}

Learn ReactJs, React Native from akashmittal.com