1. A concise explanation of the problem you’re experiencing.
The user needs to be able to click on individual points in a point cloud. I’m trying to use scene.pickPosition(), but sometimes (when the point cloud isn’t very dense) the position picked is on the globe behind it. This happens even after scene.drillPick() returns the point cloud primitive for the same mouse position.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
// in ScreenSpaceEventHandler.setInputAction for LEFT_DOWN
var pointCloud = viewer.scene.drillPick(movement.endPosition, 1);
console.log(pointCloud.primitive instanceof Cesium.Cesium3DTileset); // true
var cursorPosition = viewer.scene.pickPosition(movement.endPosition);
console.log(cursorPosition); // returns a position on the globe, not one of the points in the pointcloud
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
The user needs to be able to click on individual points in a point cloud, similar to Potree: http://potree.org/potree/examples/measurements.html
4. The Cesium version you’re using, your operating system and browser.
firstname.lastname@example.org, Mac Mojave, Chrome latest