Detecting clicks on point clouds


Is there a way of detecting mouse clicks on point clouds loaded via:

url: Cesium.IonResource.fromAssetId(assetid)

Cesium JS version is 1.69

Thanks a lot.



You can do this with viewer.scene.pickPosition(mousePosition). Here’s a full Sandcastle example.

Note that this will determine the 3D position of the clicked point on the surface as visualized, which may not be exactly the same as the point location in the source. Retrieving the source point values is currently an open feature request, see:

Thank you. We shall try that. At this stage we are not looking for exact position on the point cloud - instead, just being able to know that the point cloud was clicked. So I guess that will work.

Thanks again.