JohnK Posted February 9, 2017 Share Posted February 9, 2017 In the second part of last year I was involved in many a topic related to pivots and I suggested a number of ways to solve the various but similar problems. http://www.html5gamedevs.com/topic/26327-set-pivot-on-rotatedscaled-mesh/ http://www.html5gamedevs.com/topic/26327-set-pivot-on-rotatedscaled-mesh/ http://www.html5gamedevs.com/topic/26032-dont-change-the-mesh-position-when-setting-the-pivot/ http://www.html5gamedevs.com/topic/17207-rotating-a-mesh-around-a-pivot/ Recently I needed to return to pivots and realised that I had never really understood them. My re-visiting them has gained me some new insight into pivots and manipulating them in a much simpler way than before. Quite possibly in another year's time I will discover there is still a better way than I have now found. For the time being I would like to share my new found understanding and hope it might help some of you. So if you are trying out pivots and want to know of a fairly straightforward technique to use them read on http://babylonjsguide.github.io/advanced/Pivots GameMonetize and adam 2 Quote Link to comment Share on other sites More sharing options...
adam Posted February 9, 2017 Share Posted February 9, 2017 Nice tutorial John. I just wanted to point out that you can also use: setPivotPoint https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1497 getPivotPoint https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1524 getAbsolutePivotPoint https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1542 I need to write a doc for this at some point. If someone else wants to, please feel free. Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 9, 2017 Author Share Posted February 9, 2017 When I was checking through the old topics above I noted you had PRed those functions. Will have a play around with them and see what I can do about adding them in to my tutorial. Quote Link to comment Share on other sites More sharing options...
JohnK Posted February 19, 2017 Author Share Posted February 19, 2017 @adam set and get pivot points now added to guide Using pivots page http://babylonjsguide.github.io/advanced/Pivots GameMonetize, jerome and adam 3 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.