Nico Posted March 20, 2014 Share Posted March 20, 2014 Hi everyone, Once again I need some help, I would like to know if there is a way to pick multiple meshes ?I would like to draw a rectangle select zone with a 2D canvas, so I can have 4 positions (2D screen positions), but is it possible to pick every meshes inside this zone ? Thanks for reading ! Nico. Quote Link to comment Share on other sites More sharing options...
gwenael Posted March 21, 2014 Share Posted March 21, 2014 With opengl, you could ask for a offline rendering of a new viewport corresponding of your select zone and if I remember well you could get the list of rendered meshes. That would be the ones inside of your select area (at least partially). Quote Link to comment Share on other sites More sharing options...
gwenael Posted March 21, 2014 Share Posted March 21, 2014 The key is glLoadName. I don't know if WebGL has such a thing. Quote Link to comment Share on other sites More sharing options...
gwenael Posted March 21, 2014 Share Posted March 21, 2014 I've just found this, that could be useful: http://web.eecs.umich.edu/~sugih/courses/eecs487/common/notes/APITables.xml Quote Link to comment Share on other sites More sharing options...
Nico Posted March 22, 2014 Author Share Posted March 22, 2014 Thanks for help but it appears to not be possible to do an offline rendering of a new viewport to get back selected meshes inside a zone. I could make a mistake, since I don't have a lot of knowledge on WebGL/OpenGL, and I don't fully understand technicals articles about WebGL/OpenGL I have found, I've started using 3D engine with BabylonJS Do you (or somebody else who can help) have another idea ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 24, 2014 Share Posted March 24, 2014 Perhaps creating a box projected from your 2d rect and see if meshes intersects with the box? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
gwenael Posted March 27, 2014 Share Posted March 27, 2014 Too bad that it must be done on CPU. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 27, 2014 Share Posted March 27, 2014 We should add this to our good things to develop 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.