Snow Bars Posted September 22, 2016 Share Posted September 22, 2016 Hello! I have a problem with parent mesh rotation. Scene has two objects which will be rotation around center of bottom object. If bottom object placed on scene center then objects rotation correctly. But if replace bottom object then stranges begin... I create parrent mesh for object and try to rotate it. http://www.babylonjs-playground.com/#1KU02Z#0 Please tell me where I wrong? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 22, 2016 Share Posted September 22, 2016 Hello Not sure to understand the issue Can you elaborate on what's wrong here: http://www.babylonjs-playground.com/#1KU02Z#1 Quote Link to comment Share on other sites More sharing options...
Snow Bars Posted September 22, 2016 Author Share Posted September 22, 2016 On this example http://www.babylonjs-playground.com/#1KU02Z#1 all correct. I try describe my situation. I have any dragable objects on scene. If drag one of them all objects drags as single object. It implemented via recalculation its coordinates. Bottom object is platform for upper objects. If rotate bottom object all object upper it must rotate around bottom object center. For this goal I try assembly rotating objects in single parrent object and rotate it. If assemble object -> rotate it -> disassemble object -> move "primary" objects -> assemble parent object -> rotate parent object then objects rotate any strange. I can't understand that happens. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 22, 2016 Share Posted September 22, 2016 Can you please provide a PG where the issue is clearly highlighted? Quote Link to comment Share on other sites More sharing options...
Snow Bars Posted September 22, 2016 Author Share Posted September 22, 2016 In some approximate, it looks like this http://www.babylonjs-playground.com/#1KU02Z#2. The interface is very strange. Please do not throw tomatoes at me Box - rotation "Sphere" - move Quote Link to comment Share on other sites More sharing options...
Snow Bars Posted September 22, 2016 Author Share Posted September 22, 2016 I am sorry. http://www.babylonjs-playground.com/#1KU02Z#3 Quote Link to comment Share on other sites More sharing options...
adam Posted September 22, 2016 Share Posted September 22, 2016 If I understand you correctly, this PG should be helpful: http://www.babylonjs-playground.com/#28IXSE#17 edit on 3/19/2017: you should now use setParent for this: http://www.babylonjs-playground.com/#28IXSE#29 brianzinn 1 Quote Link to comment Share on other sites More sharing options...
Snow Bars Posted September 22, 2016 Author Share Posted September 22, 2016 Thanks for help. Adam your example is perfect! 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.