Hi,
Is it possible to look up the height for a given lat,long? I want to place an object on the surface of the map but i only have a lat and long.
Hi,
Is it possible to look up the height for a given lat,long? I want to place an object on the surface of the map but i only have a lat and long.
Hi @RandomName87,
Currently, your best bet is to use a Raycast to query the height of the terrain at that point prior to placing the object.
This reply may also be useful to you - though it was written for Unreal, it includes some relevant caveats and possible workarounds for this method.
-Alex
A post was split to a new topic: Getting a raycast hit point
Just to give an update, as of Cesium for Unity v1.13.0, you can now use the asynchronous SampleHeightMostDetailed
function to query the height on a tileset, at a given longitude / latitude position. Remember that this height is returned in meters above the WGS84 ellipsoid!
You can find a quick example in the comment on this PR: Height query API for Unity by kring · Pull Request #507 · CesiumGS/cesium-unity · GitHub