ActionManager.OnPickTrigger doesn't fire all the time

Hi the code is basically from the build a house of Workshop. I use createPlane to add photos. I have two questions. One is ActionManager.OnPickTrigger doesn’t fire all the time while I click a mesh. Here is the playground: https://playground.babylonjs.com/#1Z71FW#813 Sometime it fires when I click, sometime I have to click three or four times at the different spots of a mesh. Don’t know why.
My second question is the cat image doesn’t show[can’t see it] when I click(if it fired), but other two images[a scenery or dog] works fine. If I uncomment Line748, comment out Line749, it works for the cat image. Seems that the distance between 4-6 doesn’t work. Why?
Thanks for help

It is because the meshes are too close so you should disable picking on the walls: https://playground.babylonjs.com/#1Z71FW#816

About the cat picture it is related to z fighting you can either drop camera.maxz or change the zoffset of the cat mesh or move it a bit.

1 Like

Thanks @sebavan. I have played some numbers with minZ/maxZ & zOffset for photos on four walls. Can’t get the reliable result on all walls with those settings. Moving it a bit is the best. As I learn more on 3D rendering, I will come back on these settings again. Thanks again.