Jump to content

issue with mesh.clone() and mesh attach to parent


Arte
 Share

Recommended Posts

Hello I'm not sure to get what is wrong in your scene :)

So I added a sphere to visualize center and axes:

http://www.babylonjs-playground.com/#HWQ2QH#2 (You can see that box is correctly positioned at -1, -1, -1)

Now let's add the clone:

http://www.babylonjs-playground.com/#HWQ2QH#3 (the newBox is also correctly positioned at -1,-1,-1 from his father so -2,-2,-2 from the global world. Indeed the clone function also cloned the parent position)

And then we can move the parent box:

http://www.babylonjs-playground.com/#HWQ2QH#4 (the parent box is now at -1,1,-1 and the child box remains at -1,-1,-1 from his parent which means -2,0,-2 from the world)

 

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...