I want to draw a polygon at x meters above the ground. So if I put 10 meter above the ground, I would have the base of my polygon at 10 meter above the ground.
So I am using in my code the terrainProvider, get the point elevation then add that elevation to the altitude I want to draw the polygon.
It works nice, but for some reason, polygon are drawn from their center and not from their base. so if I want to draw the base of the polygone 10 meter above ground, I have to do.
(CoordinateElevation + polygonElevationRelativeToGround + polygonLength / 2)
Is there a way to set the pivot of the polygon to the bottom of it ?
(you can see in the sandcastle that the cylinder touch the ground, although the altitude is 50 meter. and to have a correct altitude of 50 meter, I have to add half of the cylinder length to the altitude.