Arte Posted November 9, 2017 Share Posted November 9, 2017 Hi All, I have issue with clone mesh and cloned mesh attach to parent. After attached to parent cloned mesh position behaving strangely. http://www.babylonjs-playground.com/#HWQ2QH Line 22-23-24 //behaving strangely I've been scratching my head for a while, any suggestion? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 9, 2017 Share Posted November 9, 2017 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) Quote Link to comment Share on other sites More sharing options...
Arte Posted November 9, 2017 Author Share Posted November 9, 2017 AHHHHHHHH... UHHHHH.... Forgot to reset child position. newBox.position = new BABYLON.Vector3(0,0,0); Next time I'll take smaller shovel so that I do not go too deep. @Deltakosh Thank you GameMonetize 1 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.