ua4192 Posted May 7, 2017 Share Posted May 7, 2017 Dear all. I have a small problem with my code. I want to select one of the multiple invisible but pickable meshes with the mouse. The goal is that I have a big model GLTF (assembly) loaded in the scene, but I also have the boxes of the parts contained loaded in the scene. The idea is that as in a typical CAD program be able to select on of the boxes (the closest one from the coordinates selected with the mouse in the assembly) In the scene I will load the GLTF contained meshes and the boxes (bounding boxes) of the parts in these meshes in a invisible but pickable way. I am using this approach because loading thousand of gltfs of parts is unachievable, the browser gets hang. Instead I load some big GLTFS and I want to be able to get metadata information from the parts contained in this assemblies. When I click with the mouse on the scene, I want to take the coordinates of the big assembly (GLTF) and make visible the box of the closest box of these coordinates. I am trying to use a raycast with camera position and mouse coordinates but it seems that multipick is not able to pick invisible boxes. I have also some problems to set the direction vector of the raycast based on the selected mouse coordinates and camera position. Many thanks in advanced for your support. Quote Link to comment Share on other sites More sharing options...
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.