Jump to content

Move Pivot Without Moving Mesh


JohnK
 Share

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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