I’m new to Cesium. I want to detect whether my mouse is on terrain, sky or object. I use pick function of scene but it returns undefined on map and sky. Are there any other way to do this correctly?
Hi @datum Welcome in Cesium community!
I’ve gone through your sandcastle example and I think you’ve already achieved that. As a beginner, I have done basic modifications on your example codes to check if the cursor is on Space, Map or on any object. Here is the link.
If you want to check if the cursor is on Land or Ocean, You can use Globe.getHeight or sampleTerrain function to get the surface height and match it with Ocean height which should be 0.