Dad72 Posted December 8, 2016 Share Posted December 8, 2016 Hello, When using MergeMesh and selecting the object with pickedPoint. The pivot is at the coordinate 0, 0, 0 of the scene even if the objects is a 20, 20, 20 for example. How do you put the pivot in the center of the merge objects? The pivot movement works well on a normal object, but not when you merge several objects Example here, you can see that the pivot is in the center of the scene and not in the center of the object that was merged. http://babylonjs-playground.com/#RZGEH#5 Quote Link to comment Share on other sites More sharing options...
adam Posted December 8, 2016 Share Posted December 8, 2016 Use the new setPivotPoint method: http://babylonjs-playground.com/#RZGEH#6 max123 and Dad72 2 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 8, 2016 Author Share Posted December 8, 2016 Ah, ok, cool. Thank you Adam Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 8, 2016 Author Share Posted December 8, 2016 In fact, it is still at point 0, 0, 0 the pivot when the object is merged with scene.pickedPoint() http://www.babylonjs-playground.com/#YCVDD#17 Quote Link to comment Share on other sites More sharing options...
adam Posted December 8, 2016 Share Posted December 8, 2016 Are you expecting the edit control to be in between the boxes? Quote Link to comment Share on other sites More sharing options...
adam Posted December 8, 2016 Share Posted December 8, 2016 The pivot point is not at 0,0,0. http://www.babylonjs-playground.com/#YCVDD#18 Quote Link to comment Share on other sites More sharing options...
adam Posted December 8, 2016 Share Posted December 8, 2016 http://www.babylonjs-playground.com/#YCVDD#19 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 8, 2016 Author Share Posted December 8, 2016 19 minutes ago, adam said: Are you expecting the edit control to be in between the boxes? Yes, The gizmo should be between the two box. To the middle of the object as on your first PR Quote Link to comment Share on other sites More sharing options...
adam Posted December 8, 2016 Share Posted December 8, 2016 I'm not familiar with that edit controller. It seems to be ignoring the pivot matrix. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 8, 2016 Author Share Posted December 8, 2016 Indeed, the gizmo works with the rotation, but not the translation and scaling. http://www.babylonjs-playground.com/#YCVDD#20 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 8, 2016 Author Share Posted December 8, 2016 line 118, I correct in using this.meshPicked.position instead of this.meshPicked.absolutePosition Thanks 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.