Skip to content

Instantly share code, notes, and snippets.

@trentpolack
Created July 6, 2018 01:07
Show Gist options
  • Save trentpolack/944d477a2ffd7e8aae0407514291955c to your computer and use it in GitHub Desktop.
Save trentpolack/944d477a2ffd7e8aae0407514291955c to your computer and use it in GitHub Desktop.
Get the actual camera location in the UE4 viewport? MAYBE?
auto world = GetWorld();
if(world == nullptr)
return;
auto viewLocations = world->ViewLocationsRenderedLastFrame;
if(viewLocations.Num() == 0)
return;
FVector camLocation = viewLocations[0];
@trentpolack
Copy link
Author

Widget reflector looking at the main editor viewport:
editor_main

Vs. looking at the mesh viewer viewport.
editor_mesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment