ua4192 Posted May 16, 2017 Share Posted May 16, 2017 Hi all. I have a problem. In my scene I am using instances. The problem I have is that the first time I use the mesh (imported GLTF) I am positioning and rotating the GLTF according to the product structure inherited transformation matrix. My problem is that the instances seem to take this transformation and are not properly transformed. Is there any way to reset the already applied transformations(relative rotation + position to its parent)from the imported meshes (GLTF) and create the instances with no transformations? Many thanks in advanced. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted May 16, 2017 Share Posted May 16, 2017 I've never used GLTF, so maybe this does not apply. I have done similar things to set/reset transformations on meshes, you might find the setParent() method useful. I created a reset parent method that unwinds the transformations: https://github.com/BabylonJS/Babylon.js/blob/13fe95b15653e683a51dbe64d10efdacf495ee99/src/Mesh/babylon.abstractMesh.ts If you are on <= 2.5 or want to see a PG, check this one out (I think it's from Adam): http://www.babylonjs-playground.com/#28IXSE#17 Quote Link to comment Share on other sites More sharing options...
ua4192 Posted May 17, 2017 Author Share Posted May 17, 2017 Hi. Many thanks for your support. Finally at the end I found a workaround. I create a symbolic box (a-dimensional) and make parent of meshes included in GLTF. IN this way I have not to apply any transformation on the GLTF meshes, I do it on the box instead. Many many thanks : ) 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.