# Detecting clicks on point clouds

**URL:** <https://community.cesium.com/t/detecting-clicks-on-point-clouds/10784>\
**Category:** CesiumJS\
**Created:** [September 2, 2020, 5:32pm UTC](https://community.cesium.com/t/detecting-clicks-on-point-clouds/10784 "2020-09-02T17:32:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qiqbaltd](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/qiqbaltd/32/1987_2.png) [@qiqbaltd](https://community.cesium.com/u/qiqbaltd)\
**Post date:** [September 2, 2020, 5:32pm UTC](https://community.cesium.com/t/detecting-clicks-on-point-clouds/10784/1 "2020-09-02T17:32:18Z")

</div>

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./

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [September 4, 2020, 2:52pm UTC](https://community.cesium.com/t/detecting-clicks-on-point-clouds/10784/2 "2020-09-04T14:52:58Z")

</div>

You can do this with `viewer.scene.pickPosition(mousePosition)`. Here’s a full [Sandcastle example](https://sandcastle.cesium.com/index.html#c=fVRtb9s4DP4rRu7DHCBR/CL5Jc2KK3I7XLECG9Zg9yXAQbGZRKgsGbKcrjfkv49+W50UmwDDMvmQD0mTPHHjnAQ8g3HeOwqenTVUoi7I11bmvsvaz7VWlgsF5t3M+b5VDh4LxqDos9EnkYNZDoaZAW7hX21kvukg7nSrztObrdqqE7JZIaECi3QdL6kyUEBKIwphxQkqwvPc7UhGAXWv8K9NZ+72YTSnNvIn/b1WX6DStcmA7I0u7ioE3+dukKSUTWevRqUWyq6lrvPHI8+FOiydkcvmcGtB1dwKrZaONTXMLvUF/yaKurgbw4JXyLm7njH71+TbXK9Sv+lUR65yef0bHrGcoB5LnsGHEyj7TwdyL0qXcXRQNSS9D9LkrMra3mVNWO6+Vt0FGh/TPtGGtNB1BZ91JRo1UrcAUvaCm5+4UmRPA+wrlzW8+X0jgHvhdXrjtG4yrSotgUh9cN+4a4I/z36V9ealBPLw4e/Nf+uH+/XHvpwdfcYLMJzs5ctGD02RQ2WFan+Js7xoIm4s3rgKXT+IosiPSEppGLIgpfHMmdMgZSEKY5Ywn3pBOnMoC6I4TEjKGAt8Soce0kZgZAPHqHVyYSD7LbVHkjBMaejFSUI9H73PHI8wGkdpEHgBo8z3PIbheMSL4siP0yTFWBkN/HEH1+VvGGgQhJHv+2EUJCz1aOuNoevUD1mcpD7m5Te0sR+lEaMpYoM4TNOB4dy/89oMSXr9HE9mk1VlXyTcdpA/RVFqY5s5dAlZWChKiTugWuzq7Aksyaq2ORvoH1ZrucOGGhVsx7Ong9G1ypeOOey4SwMse/9grQbbdmpxN7SzSstvI/FOG9xBc4ODXFdj5fmKVjRTMSY/gbEi43LOpTjgABcixwl6yzi3usTxvmAdVDttrS7G2mtacgSOAY6J97hS588gDke7xPhl/mq6WgzVXeXi5Ij8/XZytYe3EyeTvKpQs6+lfBT/w3Zyu1og/sJM6na3fcI0JX9pIEf/9qETEkJWC/x8a9WHjfAmmE77Aw).

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

---

<div class="post-metadata">

**Author:** ![qiqbaltd](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/qiqbaltd/32/1987_2.png) [@qiqbaltd](https://community.cesium.com/u/qiqbaltd)\
**Post date:** [September 4, 2020, 3:17pm UTC](https://community.cesium.com/t/detecting-clicks-on-point-clouds/10784/3 "2020-09-04T15:17:56Z")

</div>

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.
