mojojojo Posted August 21, 2016 Share Posted August 21, 2016 Hi, I have some meshes, created with PolygonMeshBuilder. They're not overlapping, but their bounding boxes are as you can see in the attached screenshot. I want to achieve pixel perfect picking for those. Using scene.pick without fastcheck for some reason still picks those meshes by bounding box. (In the attached screenshot - the green mesh is getting picked instead of the purple one) Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 22, 2016 Share Posted August 22, 2016 Hi again @mojojojo. I set-up a quick playground... http://www.babylonjs-playground.com/#1BIQIC#4 None of the picking stuff is installed, yet, but I have a couple things scheduled this morning, and don't have time to flesh-out the testing playground right now. Maybe mojo or others can flesh it out into a full-blown test scene for this issue. If not, I'll do more fleshing/testing on this... a bit later. I wonder if high-precision bounding boxes are allowed on mesh built with PolygonMeshBuilder. hmm. Interesting issue. BBL mojojojo 1 Quote Link to comment Share on other sites More sharing options...
mojojojo Posted August 22, 2016 Author Share Posted August 22, 2016 Hi @Wingnut. I've setup some actions on top of your playground - http://www.babylonjs-playground.com/#1BIQIC#6 it works perfectly... Maybe there's something wrong with my polygons... I'll investigate and update you further. Thanks Wingnut 1 Quote Link to comment Share on other sites More sharing options...
mojojojo Posted August 22, 2016 Author Share Posted August 22, 2016 Hi guys, quick update for anyone interested in this. Problem was in the way I created the Path2 for the PolygonMeshBuilder -> Previously, I added the points of the polygon, using Path2.addLineTo(x,y). Once I switched to Polygon.Parse, as in demo playground it all worked out. Thanks Wingnut 1 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.