# Is it possible to set the axis origin with a given position?

**URL:** <https://forum.babylonjs.com/t/is-it-possible-to-set-the-axis-origin-with-a-given-position/29945>\
**Category:** Questions\
**Tags:** vector3, rotationaxis\
**Created:** [May 2, 2022, 5:16pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-set-the-axis-origin-with-a-given-position/29945 "2022-05-02T17:16:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kikoshoung](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kikoshoung/32/19308_2.png) [@kikoshoung](https://forum.babylonjs.com/u/kikoshoung)\
**Post date:** [May 2, 2022, 5:16pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-set-the-axis-origin-with-a-given-position/29945/1 "2022-05-02T17:16:08Z")

</div>

Is it possible to set the axis origin with a given position(red point in PG), and make a rotation around the new axis to get a new point?

I can only get a rotation around an axis in origin position(0,0,0):

 ![wecom-temp-473b8e83e2d6a12956a7f5de3776a46a](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/9/79e2fbaf4ca94424ddf4efed60782b33a2a23379.png)

but i also want a rotation around an translated axis like this:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/5/65b5b0769d75114e4a1a401031cd98872c194e78.png)

PG: [Babylon.js Playground](https://playground.babylonjs.com/#9GI5TS)

---

<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:** [May 2, 2022, 5:19pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-set-the-axis-origin-with-a-given-position/29945/2 "2022-05-02T17:19:40Z")

</div>

Hopefully you will be able to get some ideas from the parents and pivots section of

> **[Mesh Transformations | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/mesh/transforms)**
>
> Learn all about mesh transformations in Babylon.js.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [June 1, 2022, 10:40am UTC](https://forum.babylonjs.com/t/is-it-possible-to-set-the-axis-origin-with-a-given-position/29945/3 "2022-06-01T10:40:43Z")

</div>

Hello just checking in, was your question answered? @kikoshoung

---

<div class="post-metadata">

**Author:** ![kikoshoung](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kikoshoung/32/19308_2.png) [@kikoshoung](https://forum.babylonjs.com/u/kikoshoung)\
**Post date:** [June 1, 2022, 11:14am UTC](https://forum.babylonjs.com/t/is-it-possible-to-set-the-axis-origin-with-a-given-position/29945/4 "2022-06-01T11:14:49Z")

</div>

Hello @carolhmj, this problem is done. 😃
