I have some issue with clicking on a 3D objects functionality. I determine if I click on it or no by ray intersection with 3D object’s bounding boxes and it works great but then I added vertex shader which move vertices to other positions and now 3D objects on a screen and their bounding boxes doesn’t much to each other positions. So how can I detect if I click on 3D object if it’s vertices positions changes in each frame by some shader?
And one more question, I attach the shader, I mentioned above, to all my materials, but I also use Text Component in World layer on this scene. How I can apply the vertex shader also to world text component?
There’s no easy answer to this, you would have to recalculate the bounding box ‘somehow’ which is difficult because the processing is in a shader. You may want to consider framebuffer picking instead Entity Picking | Learn PlayCanvas