Hi,
In my game, I need to draw a polyline that is clamped to the ground, I saw that a similar option exists in CesiumJS (Polylined clamped to ground).
Is this option also available in Unity?
If not, how do you suggest implementing it?
Thanks!
Hi,
In my game, I need to draw a polyline that is clamped to the ground, I saw that a similar option exists in CesiumJS (Polylined clamped to ground).
Is this option also available in Unity?
If not, how do you suggest implementing it?
Thanks!
@asaf.masa Thank you for the question! At the moment, I think your best bet is using the Unity LineRenderer component with elevations obtained from SampleHeightMostDetailed. This wonât keep the line on the ground as the elevation changes, but will make sure itâs at the position of the highest detail tile (the terrain that will show when youâre up close), so itâs at least going to look correct from that position.
Weâre in the process of adding the functionality in Cesium Native that will enable this to be done more accurately. Weâre figuring out a system for placing objects at the height of terrain even as the level of detail changes, and weâre also implementing a Raster Overlay for vector data loaded from GeoJSON that will let polylines (as well as polygons) be rendered over the top of terrain. Unfortunately I donât have a timeline for these features making their way into Cesium for Unity.
@azrogers There is a PR that fixes this issue, hope it will be accepted soon.