How to pick decal?

Hello, I’m a newbie babylonjs.

I wish make draw the decals and select them.
but scene.pick never picking decals. only pick meshes.
here’s playground Babylon.js Playground

how can I pick the decals?

sorry for my english

I wonder if the isPickable Boolean of the mesh (abstractmesh?) is set to false when used as a decal? May need to explicitly define it…

no decal.isPickable is true :frowning:
https://www.babylonjs-playground.com/#DMP6ZD#1

Does the pick return an array of elements? Maybe the pick returns the whole lot of decals and you have to sort through that?

Sorry I havent tried decals yet but I would like to xp

https://www.babylonjs-playground.com/#DMP6ZD#2

no pick returns only a picked mesh :frowning: but not decals

The main problem is that decal is co-planar with the below mesh so it may not be picked because it is not closer to the user

you can use scene.multiPick to find all candidates and not just the closer

1 Like

It works! thanks!
https://www.babylonjs-playground.com/#DMP6ZD#3

1 Like