billboardModeAll breaks pick order for instances

Hello,

while playing around with instances I noticed that I can’t pick a instancedMesh which is in front of a normal mesh if I use billboardMode. It’s working fine if a normal mesh is in front of a normal mesh but the instances have to be different here. Is there any way to fix this?

https://playground.babylonjs.com/#F97SE0#2

Best

EDIT:

I tested it with bjs gui but there is the same problem. Pointer blocking is not working for instances with billboardmode = all: https://playground.babylonjs.com/#F97SE0#3

The whole purpose is that I don’t want to create a separate mesh for each button. I was able to create node material that updates the color for the hovered instances only but I can’t get my instanced mesh to block pointer events.

https://nme.babylonjs.com/#AGSGFM#20

Here’s a PR that will fix this problem:

2 Likes