Last active
February 7, 2025 10:14
-
-
Save sephirot47/466e29c7cded26d72ae2 to your computer and use it in GitHub Desktop.
UE4 Get Camera Location or Position and Forward Vector (useful for Tracing)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APlayerCameraManager *camManager = GetWorld()->GetFirstPlayerController()->PlayerCameraManager; | |
FVector camLocation = camManager->GetCameraLocation(); | |
FVector camForward = camManager->GetCameraRotation().Vector(); |
It helped me in 2021 :) Thanks
Thanks a lot :)
Thanks man!
CameraManager = UGameplayStatics::GetPlayerCameraManager(GetWorld(), 0);
Also Works in ue5
still works in UE5, thanks!
thank you very much!! Great!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
YOOO I know this comment is coming in 5 years after the post but this works, tysm!!! Extremely helpful.