Ruffle Posted May 11, 2016 Share Posted May 11, 2016 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. Quote Link to comment Share on other sites More sharing options...
adam Posted May 11, 2016 Share Posted May 11, 2016 You have to make the camera's minZ smaller. http://www.babylonjs-playground.com/#1KNCOA#1 Quote Link to comment Share on other sites More sharing options...
Ruffle Posted May 12, 2016 Author Share Posted May 12, 2016 Yes, that worked! Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.