I am very excited about the appearance of this feature and immediately started using it in my project upon learning about it. However, when I call pickAsync, the console gives the following warning. I can confirm that it is caused by texture baking animation. I have been blocked by this issue for a few days, and although I have been reading the source code to find the problem, my technical level is relatively low. So, I would like to seek some help here.
There is another issue, which is the problem of picking up on screens of different resolutions. The input x and y need to be multiplied by window.devicePixelRatio
How could we use this in a scene that also contains 2d gui in 3d space where the gui occludes and gets occluded? If i were to add them to the gpupicker list, they don’t get their input events.
A two pass system wouldn’t be too hard to do, right? First get a mesh using the gpu picker and then get the details on the cpu? The cpu then only would have to check against a single mesh which is probably still great for performance. Especially if you can get the details only when the mesh is one you care about.
I guess we can already do that with the scene picking predicate, but not sure if the ui events would still get fired correctly
I had to try a few things, but got it in a place where the gpu picker helps/overwrites the default picker
This method still allows any default behavior to still work, like UI or the scene.meshUnderPointer.
One thing I’m still kinda missing is being able to use a different gpu picker material for certain meshes. For example, to be able to click through the transparent areas of a material (just clipping based on the texture alpha). I might look into a solution another time, maybe will do a PR.
@Deltakosh Thank you so much for working on this, the performance is amazing.
Is there any chance to create a method that receives a Ray? I really want to use it on my VR apps!
Edit: I know this method needs a screen coordinate one idea that just occurred to me would be rendering the scene from the ray perspective as if it was a camera, so x and y would be the center of the texture.