Detecting clicks on point clouds

Hi,

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

Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(assetid)

Cesium JS version is 1.69

Thanks a lot.

Sincerely,

Q./

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: https://github.com/CesiumGS/cesium/issues/7953.

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.