LV3 Posted October 11, 2017 Share Posted October 11, 2017 I've got a bunch of meshes, and I want to dynamically group them under some parent object and apply a transform (translate+rotate) to the parent to manipulate them as a group. My problem is that the child meshes' world matrix isn't preserved when I swap from one parent to another, so I can't directly add/remove children from my dynamic groups like I want to. I figure I can achieve my goal if I "de-parent" the child objects while preserving their world matrix. Is there any way to do this built in to Babylon.js or do I have to hack out some matrix voodoo on my own? (I'm not exactly proficient with matrix computations) Quote Link to comment Share on other sites More sharing options...
adam Posted October 11, 2017 Share Posted October 11, 2017 childMesh.setParent(null); GameMonetize and LV3 2 Quote Link to comment Share on other sites More sharing options...
LV3 Posted October 12, 2017 Author Share Posted October 12, 2017 thanks. didn't know to use that method instead of setting childMesh.parent directly. 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.