Jump to content

Preserve transform when de-parenting meshes


LV3
 Share

Recommended Posts

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)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...