# Is setAbsoultePosition doesnt relative to mesh pivot pointer?

**URL:** <https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709>\
**Category:** Questions\
**Tags:** pivot, origin, position\
**Created:** [August 2, 2022, 1:10pm UTC](https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709 "2022-08-02T13:10:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [August 2, 2022, 1:10pm UTC](https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709/1 "2022-08-02T13:10:51Z")

</div>

[Babylon.js Playground](https://playground.babylonjs.com/#4EICDI) (zoom out to see the effect)

Here I make a cone  
Move pivot pointer to upper corner  
And set position to cone from the camera

I expect to place top corner as camera placed, but if you zoom out, you will see the middle of cone, not the top.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/9/b/9b0783d8c146d2992f3224d8ef3dd8d89e74a8ee.jpeg)

In the end I wanna to have cone draw from the camera to make custom frustum culling ([Is it possible to set intersection ordering?](https://forum.babylonjs.com/t/is-it-possible-to-set-intersection-ordering/32689))

---

<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:** [August 2, 2022, 2:50pm UTC](https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709/2 "2022-08-02T14:50:04Z")

</div>

This is expected as the mesh is still the exact same.

In order to do what you want, you either need to bakeCurrentTransformIntoVertices() after moving the cone OR you can use a parent and offset the cone in the parent.

The pivot will be use only as a center of scale and rotation.

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [August 2, 2022, 3:46pm UTC](https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709/3 "2022-08-02T15:46:35Z")

</div>

Thank, seem like the solution with setup a parent works well  
PG [https://playground.babylonjs.com/#4EICDI#1](https://playground.babylonjs.com/#4EICDI#1)

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [August 2, 2022, 7:13pm UTC](https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709/4 "2022-08-02T19:13:41Z")

</div>

> [@sebavan](#):
>
> The pivot will be use only as a center of scale and rotation.

Interesting. Why did it make so? All 3d soft that’s I know use pivot pointer as origin to rotate, scale, move and stick in slots.  
Also, the “bakeCurrentTransformIntoVertices” didn’t work in my PG from the first message. And one point — no one example exists with this function:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/d/fd1b6a374da9eff2f44936c3c8575e95580d0de8.png)

---

<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:** [August 2, 2022, 8:19pm UTC](https://forum.babylonjs.com/t/is-setabsoulteposition-doesnt-relative-to-mesh-pivot-pointer/32709/5 "2022-08-02T20:19:01Z")

</div>

Move is not related to pivot, as the pivot moves with it.

bakeCurrentTransformIntoVertices() on a mesh will basically bake the current vertices (worldSpace) into the local mesh data. So if the mesh has centered vertices, you can move it as you wish and bake the data. As a Result the mesh contains repositioned and rescaled vertices (working basically as a new parent, being baked in the data so more efficient).
