curry Posted October 18, 2016 Share Posted October 18, 2016 Hi guys, I was trying to load obj meshes to the scene and for reusing them, I tried the method "createInstance". However, I can't set the matrix of each instance by assigning each mesh a "_worldMatrx". I am confused with the issue. Is there any methods for setting the mesh matrix? Sorry for the rookie question, any suggestion will be helpful. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 19, 2016 Share Posted October 19, 2016 Hiya @curry, welcome to the forum. I KNOW there are many ways to transform mesh with matrices, here. I'm just not very knowledgeable about using matrices. SO, I'm only "bumping" your questions... to the top of the Q&A forum. Likely, I have no good answers for you. Sorry. Um... take a look at this... http://doc.babylonjs.com/classes/2.4/Mesh#baketransformintovertices-transform-rarr-void Notice that is part of the Babylon Mesh class, so it would be mesh.bakeTransformIntoVertices(someMatrix), I suppose. That might work for you. Not sure. We'll talk... and hopefully others (smarter folks than I) will comment soon. Again, welcome. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2016 Share Posted October 19, 2016 Hello no need to set the matrix, just set mesh.position, scaling and rotation and the matrix will be updated for you 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.