Hey there,
I´m trying to get the position of a mouseclick including the terrain height. So imagine this. The camera is close to the ground and pointed towards a mountain. If I click on the mountain I want to get the mosition on the mountain. I was able to get this working but with one problem.
If the click position (so, for example a mountain top) has the ellipsoid behind it its all working fine. I get the height and the correct position. But if I rotate the camera enough so that behind the mountain top there is the horizon (or rather space) I get an error even though I am still clicking on terrain. Hope this was clear enough.
Heres the gist for a sandcastle example
: https://gist.github.com/AlexZeller/1452287607b0d1fad642bc3111bc531d
Thanks for your ideas