Hello @Gabby_Getz
I am using following code to pick point on the globe.
function pickCartesianOnGlobe(mousePos: Cesium.Cartesian2, viewer: Cesium.Viewer): Cesium.Cartesian3 | undefined {
//pick will return the cartesian coordinates
let cartesian: Cesium.Cartesian3 | undefined = undefined;
cartesian = viewer.scene.pickPosition(mousePos);
if (!cartesian) {
const ray = viewer.camera.getPickRay(mousePos);
cartesian = viewer.scene.globe.pick(ray, viewer.scene);
}
return cartesian;
}
I hope this helps.
Thank you.