Download

Get rotation of camera component of actor

How can i get rotation of camera component of actor?
Thanks in advance.


// assuming you have a pointer to a camera component
UCameraComponent* cameraComponent;


// get camera info
 FMinimalViewInfo cameraViewInfo;
 cameraComponent->GetCameraView(1.0f, cameraViewInfo);
 FVector cameraLoc = cameraViewInfo.Location;
 FRotator cameraRot = cameraViewInfo.Rotation;