JohnK Posted August 17, 2015 Share Posted August 17, 2015 For my project I form a model from a number of meshes (which may not be adjoining) by assigning them the same parent and forming a bounding container around them. I then check to see if two different models are in contact by first using intersectsMesh on the two bounding containers and if true checking to see if any of the meshes from model A are in contact with any of the meshes from model B and only in this case putting contact of models to be true. Would this be possible be merging the meshes to form a model instead and if so would it be any more efficient.. A playground example is here http://www.babylonjs-playground.com/#1XNAP4#1 When box1, box2 and box3 are merged into box and cube1, cube2 and cube3 into cube it appears I lose access to the original meshes. What I would like to do is when cube intersects with box I want to check if boxes 1, 2 or 3 are in contact with any of cubes 1, 2 or 3. In the case ofcube.position = new BABYLON.Vector3(-9, 3, 0);I need a function that returns false and in the case ofcube.position = new BABYLON.Vector3(-12, 3, 0);the function should return true. 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.