Setting mesh.isVisible = false makes it unpickable

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:

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

Ok. My search was not so good.

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

Or better yet update the playground?

Setting scene.pointerUpPredicate fixes the problem:

2 Likes