hit2501 Posted February 22, 2017 Share Posted February 22, 2017 Hi everyone, I imported a mesh from Blender three times and I put different ID for each one and then I try to change the texture just for one mesh with: var newMesh = scene.getMeshByID("first_id"); newMesh.material.diffuseTexture = new BABYLON.Texture("colors/blue01.jpg", scene); But even if each mesh have a unique ID (I can see it with console.log(newMesh.id)) all the three meshes change their textures. How can I fix it to change the texture only for one mesh separate from others? Sorry for my english. Thank you all. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 22, 2017 Share Posted February 22, 2017 Hello this is because your meshes share the same material. You have to create a new one for your mesh before setting up the new texture hit2501 1 Quote Link to comment Share on other sites More sharing options...
hit2501 Posted February 22, 2017 Author Share Posted February 22, 2017 Thanks Delta, I`ll try it right now... Quote Link to comment Share on other sites More sharing options...
hit2501 Posted February 23, 2017 Author Share Posted February 23, 2017 Thank you Deltakosh, is solved. 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.