# Scene.pick and obtaining position of picked entity

**URL:** <https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585>\
**Category:** CesiumJS\
**Created:** [February 21, 2018, 10:42am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585 "2018-02-21T10:42:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roberto\_Minelli](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Roberto\_Minelli](https://community.cesium.com/u/Roberto_Minelli)\
**Post date:** [February 21, 2018, 10:42am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/1 "2018-02-21T10:42:43Z")

</div>

Hi,

I am using the last version of cesium with the GeoAdmin Terrain with 3D tiles as in [this code pen](https://codepen.io/oterral/pen/pgQgKB).

I am trying to pick an object (i.e., a 3D building in this case) using **scene.pick**.

If I follow the [example in the sandbox to pick a feature](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Feature%20Picking.html&label=3D%20Tiles) it works fina and I am able — for example — to change the color of the hovered entity.

For further queries, however, I need to get the position (i.e., the center of the bounding box) of the picked entity/feature.

I tried in many ways, but I did not succeed. Is there any known solution for this? Should I use [scene.pickPosition](https://cesiumjs.org/Cesium/Build/Documentation/Scene.html#pickPosition) or is there any other way to accomplish this? I was expecting a way to get the position of the pickedFeature directly.

Best regards and thanks in advance!

Roberto

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [February 22, 2018, 12:12am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/2 "2018-02-22T00:12:56Z")

</div>

It isn’t possible to get the position or bounding volume of the feature, but yeah, you can use scene.pickPosition to get the exact location where the mouse picked.

---

<div class="post-metadata">

**Author:** ![Roberto\_Minelli](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Roberto\_Minelli](https://community.cesium.com/u/Roberto_Minelli)\
**Post date:** [February 22, 2018, 7:10am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/3 "2018-02-22T07:10:22Z")

</div>

Thank you Sean.

I find it strange that I cannot get the bounding volume of the feature but I can change its color :S

scene.pickPosition returns the position where the mouse picked, thus, in case I pick a feature (say, a building) I get a position that ‘touches’ one of the walls of the picked building. Am I right?

Best,  
R

---

<div class="post-metadata">

**Author:** ![Roberto\_Minelli](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Roberto\_Minelli](https://community.cesium.com/u/Roberto_Minelli)\
**Post date:** [February 26, 2018, 9:56am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/4 "2018-02-26T09:56:35Z")

</div>

So, you all confirm that — besides using **scene.pickPosition** and obtain the position where the mouse picked — there is no way to access the bounding volume of the picked feature.

I need to check whether a given point is inside the bounding volume of the picked feature. Is there any known way to achieve this?

Cheers and thanks in advance,

Roberto

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [February 26, 2018, 9:59pm UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/5 "2018-02-26T21:59:33Z")

</div>

The **Cesium3DTileset** feature does not have the underlying model information tied to the object. So no, there is currently no way to retrieve the model itself from a **pick** that I’m aware of.

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [February 27, 2018, 1:23am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/6 "2018-02-27T01:23:13Z")

</div>

Roberto - keep an eye on [https://github.com/AnalyticalGraphicsInc/3d-tiles/issues/127](https://github.com/AnalyticalGraphicsInc/3d-tiles/issues/127).

The bounding volume information would have to be embedded in the tile in some way - it is not easy to synthesize at runtime right now.

---

<div class="post-metadata">

**Author:** ![Roberto\_Minelli](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@Roberto\_Minelli](https://community.cesium.com/u/Roberto_Minelli)\
**Post date:** [February 27, 2018, 8:02am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/7 "2018-02-27T08:02:06Z")

</div>

Thank you, I am following the issue now.

To me it looks _strange_ only because I can easily invoke .color and change the color of the feature, but I cannot retrieve, say, its geometry.

Best,

Roberto

---

<div class="post-metadata">

**Author:** ![sean\_lilley](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/sean_lilley/32/2083_2.png) [@sean\_lilley](https://community.cesium.com/u/sean_lilley)\
**Post date:** [March 2, 2018, 12:50am UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/8 "2018-03-02T00:50:08Z")

</div>

Yeah, geometry is tougher because we offload that to GPU memory so its not easily accessible, whereas colors are stored on the CPU and updated on the GPU as textures. It’s a different kind of problem.

---

<div class="post-metadata">

**Author:** ![Cherukumilli](https://avatars.discourse-cdn.com/v4/letter/c/e0b2c6/32.png) [@Cherukumilli](https://community.cesium.com/u/Cherukumilli)\
**Post date:** [January 13, 2019, 2:22pm UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/9 "2019-01-13T14:22:58Z")

</div>

Sean,

Is there anyway to get the surface normal of the picked position?

-DC

---

<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:** [January 14, 2019, 2:08pm UTC](https://community.cesium.com/t/scene-pick-and-obtaining-position-of-picked-entity/6585/10 "2019-01-14T14:08:15Z")

</div>

Sorry I missed your other thread, I responded to this here:

[https://groups.google.com/d/msg/cesium-dev/RyK1q3jdfgo/\_7-togSbAQAJ](https://groups.google.com/d/msg/cesium-dev/RyK1q3jdfgo/_7-togSbAQAJ)
