# Unable to pick terrain object

**URL:** <https://discourse.threejs.org/t/unable-to-pick-terrain-object/16186>\
**Category:** Questions\
**Tags:** raycaster, geometry\
**Created:** [June 13, 2020, 4:35am UTC](https://discourse.threejs.org/t/unable-to-pick-terrain-object/16186 "2020-06-13T04:35:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 13, 2020, 8:58am UTC](https://discourse.threejs.org/t/unable-to-pick-terrain-object/16186/2 "2020-06-13T08:58:23Z")

</div>

I’ve imported your code in a fiddle to debug it: [https://jsfiddle.net/0kqtrb3s/4/](https://jsfiddle.net/0kqtrb3s/4/)

The problem is that you recompute the `position` attribute but you don’t recompute the bounding volumes of the geometry. That means the bounding volumes have a very large scale and thus won’t detect the intersections. Doing the following after recomputing `position` should solve your issue:

```auto
terrainMesh.geometry.attributes.position = newPositionAttribute;
terrainMesh.geometry.computeBoundingBox(); // FIX
terrainMesh.geometry.computeBoundingSphere(); // FIX

```

---

_[View the full topic](https://discourse.threejs.org/t/unable-to-pick-terrain-object/16186)._
