How can I set this up in c++?
Like the title said i want to know how to set this blueprint in C++.
asked Feb 23 '15 at 04:44 PM in C++ Programming
To get the player camera from another class, you use
FVector CameraLocation = GEngine->GetFirstLocalPlayerController(GetWorld())->PlayerCameraManager->GetCameraLocation();
FRotator CameraRotation = GEngine->GetFirstLocalPlayerController(GetWorld())->PlayerCameraManager->GetCameraRotation();
To "offset" it, you add a rotation amount: myComponent->RelativeRotation.Pitch = CameraRotation.Pitch + 90.0f;
Follow this question
Once you sign in you will be able to subscribe for any updates here