Help with translating lat lon to unreal coords in C++

Hi, I am wondering how to use the C++ API to translate lat lon coordinates to unreal engine coordinates. I am looking for something similar to the “Inaccurate Transform Longitude Latitude Height to Unreal” blueprint function I have seen.

Essentially I want to pass the georeference and a lat lon pair and get the corresponding unreal coordinates. I realize that height must also be passed but maybe there is a way to snap to the terrain height at that point?

Also, I’ve seen references to georeferenced objects instead of translating to unreal coordinates. Maybe this is a better approach? Still would not know how to achieve this in C++ though.

maybe you need this:
ACesiumGeoreference* pGeoreference = ACesiumGeoreference::GetDefaultGeoreference(GetGameWorld());
FVector tmpFV = pGeoreference->InaccurateTransformUnrealToLongitudeLatitudeHeight(VertexPnt);

1 Like

Thanks for the help, yes it was as simple as finding the georeference object and using the TransformLongitudeLatitudeHeightToUnreal function