reddozen Posted November 6, 2013 Share Posted November 6, 2013 Is there a way to join meshes together so that even if they're scaled, they maintain their joined position? Example:I have a terrain and sepraite tree meshes. If i want to scale the entire scene down how can I make sure that the location of the trees stays relative to their original position on the terrain? Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 6, 2013 Share Posted November 6, 2013 Hi, I don't know if it exists a way to do that automatically in Babylon, But i would link the tree position to the terrain actual size: tree.position = getTreePosition(terrain)Something like this. Quote Link to comment Share on other sites More sharing options...
reddozen Posted November 6, 2013 Author Share Posted November 6, 2013 Hi, I don't know if it exists a way to do that automatically in Babylon, But i would link the tree position to the terrain actual size: tree.position = getTreePosition(terrain)Something like this. That's basicially what I'm asking. If there's a way to join the 2 meshes at a point or combine them. Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 7, 2013 Share Posted November 7, 2013 To join two meshes, you can use the property "parent" on a mesh to join another one : tree.parent = terrainThis way, all transformations done on terrain will be done to the tree as well. But i'm not sure this will keep the tree relative position on the terrain. In this case, you will have to do the work with your own code. 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.