# Very simple axis rotation demo

**URL:** <https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380>\
**Category:** Demos and projects\
**Created:** [October 26, 2024, 6:43pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380 "2024-10-26T18:43:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [October 26, 2024, 6:43pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/1 "2024-10-26T18:43:04Z")

</div>

This is a VERY simple demonstration to show the positive direction of rotation around an axis.

The result: point your left hand thumb in the positive direction of the rotation axis. The mesh will rotate in the direction of your curled fingers.

I needed to know for sure, and other examples (those linked from [Rotation Conventions](https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/rotation_conventions)) weren’t explicit in this regard.

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

 ![Screenshot_20241026_144155_Chrome](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/a/cac92dc139dcd2bc537ea5997355cd926e98b92b.jpeg)

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 26, 2024, 7:13pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/2 "2024-10-26T19:13:15Z")

</div>

Sorry, I don’t get this 😛

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [October 26, 2024, 7:21pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/3 "2024-10-26T19:21:49Z")

</div>

Oh, of course.

Babylon.js is an open-source web 3d rendering engine. [This _First Step_ documentation](https://doc.babylonjs.com/journey/theFirstStep) may help!

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [October 27, 2024, 4:24pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/4 "2024-10-27T16:24:36Z")

</div>

@roland hes gotta be joking right?

☠

I don’t think I’ve ever seen someone mansplain to a Jedi Master what BJS is. haha \<3 I think hes just trolling.

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 27, 2024, 4:56pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/5 "2024-10-27T16:56:54Z")

</div>

> [@Pryme8](#):
>
> @roland hes gotta be joking right?

I mean I didn’t get why is @HiGreg demoing such a simple thing 🙂

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [October 27, 2024, 5:46pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/6 "2024-10-27T17:46:43Z")

</div>

The demo is because I couldn’t find the direction of rotation in the documentaion.

On [Rotating around axis](https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/parent_pivot/pivot) it talks about pivots and the _order_ of rotations. In [Rotation Conventions](https://doc.babylonjs.com/features/featuresDeepDive/mesh/transforms/center_origin/rotation_conventions) it has a variety of rotation descriptions of world vs. local and, again, the order of rotations.

Google AI, when searching “babylon direction of rotation,” says “In Babylon.js, rotations are **counterclockwise** when viewed **in** the positive direction of the specified axis.” I couldn’t find such a reference in the babylon docs.

I just needed to be sure because I’m about to find out if Havok Physics treats angular constraints the same way. I figured I’d post the super simple example for others. Uncomplicated by boxes, colors, or additional static or dynamic rotations.

Just a single world axes, and an axes at 0,0,0 rotating around X in a positive direction. And easy to change to any other axis.

I thoight you were being funny and I responded in kind 😀

---

<div class="post-metadata">

**Author:** ![roland](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roland/32/38940_2.png) [@roland](https://forum.babylonjs.com/u/roland)\
**Post date:** [October 27, 2024, 8:18pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/7 "2024-10-27T20:18:57Z")

</div>

> [@HiGreg](#):
>
> The demo is because I couldn’t find the direction of rotation in the documentaion.

IMHO you have to add it then to the docs. With the PG as well.

I believe you are experiencing crazily compound rotation scenarios while working on the Havok debug stuff, scenarios so complex we never had a chance to find ourselves in, so yes it make sense to break them down to the simplest ones and to be sure how the rotations really works, so no offense, when I wrote

> [@roland](#):
>
> I mean I didn’t get why is @HiGreg demoing such a simple thing 🙂

Keep it up bro! 😻

---

<div class="post-metadata">

**Author:** ![Pryme8](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pryme8/32/7212_2.png) [@Pryme8](https://forum.babylonjs.com/u/Pryme8)\
**Post date:** [October 27, 2024, 8:21pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/8 "2024-10-27T20:21:17Z")

</div>

Awww, thats nice you two.

[![](https://img.youtube.com/vi/HFnRSmEqNWI/hqdefault.jpg "Now kith") ](https://www.youtube.com/watch?v=HFnRSmEqNWI)

Now kith… 🤣

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [October 27, 2024, 8:36pm UTC](https://forum.babylonjs.com/t/very-simple-axis-rotation-demo/54380/9 "2024-10-27T20:36:42Z")

</div>

> [@roland](#):
>
> so no offense,

None taken. All good. Agreed on the crazy compound rotations with Havok. Still trucking…
