# How To Set Pivot To Mesh Center

**URL:** https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967
**Category:** Questions
**Created:** [September 7, 2020, 7:45am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967 "2020-09-07T07:45:26Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![11123](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/11123/32/10880_2.png) [@11123](https://forum.babylonjs.com/u/11123)
#### Post date: [September 7, 2020, 7:45am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/1 "2020-09-07T07:45:26Z")

</div>

The Doc Side:  
The latest pivot in Babylon (v3.2+) is a pre-transformation pivot and behaves differently than in tools like 3DS Max and Maya as the object’s position will move if scale is applied prior to setting the pivot.

I can’t understand set a pivot would not change a mesh’s position!, I read the whole doc of pivot in Babylon.js again and angin, but finaly I am still confused.

I just want to set a mesh’s pivot to its center, but I cant find any way to do it with babylonjs. In 3dsMax, only I need to do just align the pivot to it center.

---

<div class="post-metadata">

### Author: ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)
#### Post date: [September 7, 2020, 7:51am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/2 "2020-09-07T07:51:16Z")

</div>

This is usually the case by default. If it does not work in your scene could you create a repro in the playground ?

---

<div class="post-metadata">

### Author: ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)
#### Post date: [September 7, 2020, 8:24am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/3 "2020-09-07T08:24:48Z")

</div>

> [@11123](#):
>
> behaves differently than in tools like 3DS Max and Maya

This is always a problem when moving from product A to product B and you find a _method_ does not do as it did in product A. This is probably because the person who wrote the _method_ for B was used to using product C and did it that way.

Best to say what it is you are trying to achieve and demonstrate what goes wrong in a playground.

---

<div class="post-metadata">

### Author: ![11123](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/11123/32/10880_2.png) [@11123](https://forum.babylonjs.com/u/11123)
#### Post date: [September 8, 2020, 8:16am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/4 "2020-09-08T08:16:25Z")

</div>

[https://playground.babylonjs.com/#SKHBQT#9](https://playground.babylonjs.com/#SKHBQT#9)

Sorry to bother，I am newer of webgl 3d dev，I have copy your some code in playground， What I need is change local origin of a mesh for my transform work better, I use setPivotPoint and setPivotMatrix function but does’t work, do I have a mistake understanding?

---

<div class="post-metadata">

### Author: ![11123](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/11123/32/10880_2.png) [@11123](https://forum.babylonjs.com/u/11123)
#### Post date: [September 8, 2020, 8:21am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/5 "2020-09-08T08:21:57Z")

</div>

[https://playground.babylonjs.com/#SKHBQT#9](https://playground.babylonjs.com/#SKHBQT#9)

Thanks for you advice, I just need to set the local origin of a mesh. but I have not found a good way to do it.

---

<div class="post-metadata">

### Author: ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)
#### Post date: [September 8, 2020, 8:39am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/6 "2020-09-08T08:39:24Z")

</div>

I think it is the use of the parameter false you need, this resets the local origin

[https://playground.babylonjs.com/#SKHBQT#10](https://playground.babylonjs.com/#SKHBQT#10)

---

<div class="post-metadata">

### Author: ![11123](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/11123/32/10880_2.png) [@11123](https://forum.babylonjs.com/u/11123)
#### Post date: [September 8, 2020, 9:06am UTC](https://forum.babylonjs.com/t/how-to-set-pivot-to-mesh-center/13967/7 "2020-09-08T09:06:04Z")

</div>

Thanks a lot, I got it, Give false as second param of setPivotMatix function will not change the absolute position of the local origin in word coordinate but it will change mesh vertex position.  
It sovles my problem!
