Getting altitude in UE4 blueprint?

Hello,
I was wondering if it is possible to get the altitude of an actor, preferably above sea level in a blueprint. Using z value obviously won’t work as it seems the xyz values update along with the world origin as intended (correct me if I’m wrong).

Thank you for your help and Cesium for the incredible plugin!

Hello @Malkat ,

That’s correct Unreal coordinates are relative to a “local origin” which can move when “origin rebasing” is enabled on the default CesiumGeoreference actor. Additionally, Unreal’s absolute Z coordinate, even without origin rebasing, will still not necessarily be relative to the mean sea level.

We have provided a host of blueprint conversion functions on the CesiumGeoreference actor. Use the one that converts from Unreal coordinates to Longitude, Latitude, and Height (relative to the WGS84 ellipsoid, a theoretical sea level estimate). The height value will be the distance in meters of the actor above the ellipsoid that you are looking for.


Take the height (z) value from the resulting FVector to find the Cube’s geodetic height.

Let us know if you have any trouble!

3 Likes

Working fine now. Cheers!