# Setting mesh.isVisible = false makes it unpickable

**URL:** <https://forum.babylonjs.com/t/setting-mesh-isvisible-false-makes-it-unpickable/36834>\
**Category:** Questions\
**Created:** [December 23, 2022, 3:19pm UTC](https://forum.babylonjs.com/t/setting-mesh-isvisible-false-makes-it-unpickable/36834 "2022-12-23T15:19:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![flex](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@flex](https://forum.babylonjs.com/u/flex)\
**Post date:** [December 23, 2022, 3:19pm UTC](https://forum.babylonjs.com/t/setting-mesh-isvisible-false-makes-it-unpickable/36834/1 "2022-12-23T15:19:14Z")

</div>

Hi Everyone-

I changed a whole bunch of mesh.visibility = 0 to mesh.isVisible = false in my app. This makes the inspector a whole lot easier to use because the eyeball toggles isVisible. However…

It breaks my picking, Badly. Unless I am missing something, a mesh with visibility === 0 is pickable, but a mesh with isVisible === false is not. Look at this playground:

> **[Babylon.js Playground](https://playground.babylonjs.com/#ISVMX7%234)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

v key toggles isVisible, b key toggles visibility

Any ideas, workarounds or thought regarding if this is a bug welcomed.

Wishing all my fellow babylonians a joyful holiday, whatever you celebrate!

Your pal in Trenton NJ-

Flex

---

<div class="post-metadata">

**Author:** ![flex](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@flex](https://forum.babylonjs.com/u/flex)\
**Post date:** [December 23, 2022, 3:21pm UTC](https://forum.babylonjs.com/t/setting-mesh-isvisible-false-makes-it-unpickable/36834/2 "2022-12-23T15:21:28Z")

</div>

Ok. My search was not so good.

> [@Select Invisible Mesh?](https://forum.babylonjs.com/t/select-invisible-mesh/13556/2):
>
> Option 1: Set the material to a transparent material: [https://www.babylonjs-playground.com/#83SAJ8#2](https://www.babylonjs-playground.com/#83SAJ8#2) Option 2: Override the picking function to not skip over invisible meshes.

Can someone explain:  
mesh =\> { return mesh.isEnabled() && mesh.isPickable }

Or better yet update the playground?

---

<div class="post-metadata">

**Author:** ![flex](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@flex](https://forum.babylonjs.com/u/flex)\
**Post date:** [December 23, 2022, 5:06pm UTC](https://forum.babylonjs.com/t/setting-mesh-isvisible-false-makes-it-unpickable/36834/3 "2022-12-23T17:06:15Z")

</div>

Setting scene.pointerUpPredicate fixes the problem:

> **[Babylon.js Playground](https://playground.babylonjs.com/#ISVMX7%236)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes
