Use reverse depth buffer picking to always return to the distant mesh

click box1 to pick with ray return box2
click box2 to pick with ray return box1

see console print

maybe engine.useReverseDepthBuffer affect _pickWithRayInverseMatrix in ray.js
So, it seems that the alignment of the hit mesh by receiving the inverted value and inverting the start and end points of the ray

I say maybe because lost the exact path trace due to a side effect.

Sorry for the delay, this PR will fix the problem:

4 Likes