Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

scene.pick not working when too close to a mesh

$
0
0

Hi, 
I don't know if you could really call this a bug or maybe it's working as intended and I'm doing it wrong... (sorry)

If you get sufficiently close and intimate with a mesh you can't pick it.
Here's a playground:

http://www.babylonjs-playground.com/#1KNCOA

The important parameter to look at is the Z coordinate of the camera.
If I set it to -1.06 then I can successfully pick the front face of the box and distance to the box is 0.01. (I'm printing pickResult in the console)
If I set it to -1.04 then I can only pick the back face of the box yet I can still see the front face.
If I set it to more than -1 then I can't see the box so I can't pick it, that's normal.

It's as If the ray's origin wasn't exacly in the camera's viewframe but 1 unit length in front of it.


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>