Art Vandelay Posted February 7, 2018 Share Posted February 7, 2018 Hi, Is there anyway to pick a bounding box? I know I can pick a mesh using scene.pick but then pickInfo.pickedPoint will give me the point where the picking ray hit the mesh. What I would like to get is the point where the picking ray hit the bounding box of the mesh. How can I do that? Thanks! Quote Link to comment Share on other sites More sharing options...
Amarth2Estel Posted February 7, 2018 Share Posted February 7, 2018 Hi Art Vandelay ! There may be a more efficient way to do, but here is a solution : Create a real mesh from your bounding box data (you will find in THIS post how to do it) Disable this mesh to avoid unnecessary computation and to be sure it is not drawn Change the predicate function on your picking method to ensure you pick only 'MeshBuildFromBoundingBoxData' (you might use Tags if you have many meshes/bounding box in your scene) This way you will get the wanted intersection point ! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 7, 2018 Share Posted February 7, 2018 Can't add anything else, @Amarth2Estel said everything Amarth2Estel 1 Quote Link to comment Share on other sites More sharing options...
Art Vandelay Posted February 8, 2018 Author Share Posted February 8, 2018 Thanks for the advice Will give it a try. 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.