adam Posted March 24, 2016 Share Posted March 24, 2016 I'd like to be able to pick a mesh (instance) when isVisible is false. It seems that isVisible affects pickability for some reason. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted March 24, 2016 Share Posted March 24, 2016 I know I did that in Dialog extension. Would have a button, that you could give action to disappear the form. If you went back to that space & clicked, form would re-materialize. I did it by assigning a clear material to the button Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 24, 2016 Share Posted March 24, 2016 Hello there is a simple way to control how pickable meshes are selected: scene.pointerDownPredicate: http://www.babylonjs-playground.com/#1XJSAN#3 adam 1 Quote Link to comment Share on other sites More sharing options...
adam Posted March 24, 2016 Author Share Posted March 24, 2016 I forgot about that. Thanks! Quote Link to comment Share on other sites More sharing options...
adam Posted March 24, 2016 Author Share Posted March 24, 2016 I got that to work with a regular mesh: http://www.babylonjs-playground.com/#1XJSAN#16 I can't get it to work with an instance of the mesh though. I can't even get the visible instance to work: http://www.babylonjs-playground.com/#1XJSAN#17 Quote Link to comment Share on other sites More sharing options...
dbawel Posted March 25, 2016 Share Posted March 25, 2016 When isVisible = true; or mesh.Visibility = 1; Then the mesh is always pickable in both of these Visibility methodes - however, this is not the case with an instanced mesh. I would use DK's example of pointerDownPredicate to make a mesh pickable or not - as I've often required both pickable and non-pickable meshes and for instances also - for both Visible and inVisible meshes - so this provides me with all versatility for any scene specific operations. DB Quote Link to comment Share on other sites More sharing options...
adam Posted March 25, 2016 Author Share Posted March 25, 2016 At this point, I'm just curious why instance meshes are not pickable at all using this method. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 25, 2016 Share Posted March 25, 2016 Hum...this should work Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 25, 2016 Share Posted March 25, 2016 ok bug found...I'll fix it for next commit adam 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.