# How to animate the mesh on any axis？

**URL:** <https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310>\
**Category:** Questions\
**Created:** [December 27, 2021, 3:25am UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310 "2021-12-27T03:25:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 27, 2021, 3:25am UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310/1 "2021-12-27T03:25:12Z")

</div>

Hi everyone , I’m a freshman of babylon.js .  
I have a question and I hope someone can help me .

My playground:

> **[Babylon.js Playground](https://playground.babylonjs.com/#WLULK9%233)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 27, 2021, 6:27am UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310/3 "2021-12-27T06:27:49Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#WLULK9%235)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

> **[Rotating Around Axis | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/mesh/transforms/parent_pivot/pivot#how-to-use-a-pivot-as-a-parent)**
>
> Learn how to rotate around an axis in Babylon.js.

---

<div class="post-metadata">

**Author:** ![Moriy](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/moriy/32/30563_2.png) [@Moriy](https://forum.babylonjs.com/u/Moriy)\
**Post date:** [December 27, 2021, 7:17am UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310/4 "2021-12-27T07:17:17Z")

</div>

It is an easy way to make it rotation from aixs with animation (upward to any axis).

> **[Babylon.js Playground](https://playground.babylonjs.com/#WLULK9%236)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

or like this? rotate from any axis?

> **[Babylon.js Playground](https://playground.babylonjs.com/#WLULK9%237)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [December 27, 2021, 8:06am UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310/6 "2021-12-27T08:06:32Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#WLULK9%237)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Why not modify the quaternion directly？

---

<div class="post-metadata">

**Author:** ![Moriy](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/moriy/32/30563_2.png) [@Moriy](https://forum.babylonjs.com/u/Moriy)\
**Post date:** [December 27, 2021, 10:21am UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310/7 "2021-12-27T10:21:57Z")

</div>

quaternion is not linear, if you want to control it by animation, it is hard to set keys

---

<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:** [January 3, 2022, 2:35pm UTC](https://forum.babylonjs.com/t/how-to-animate-the-mesh-on-any-axis/26310/9 "2022-01-03T14:35:49Z")

</div>

quaternion animations are slerp so it should be ok.
