# Rotate a BABYLON.GUI.Rectangle in 3 axis?

**URL:** <https://forum.babylonjs.com/t/rotate-a-babylon-gui-rectangle-in-3-axis/21537>\
**Category:** Questions\
**Created:** [June 9, 2021, 5:05pm UTC](https://forum.babylonjs.com/t/rotate-a-babylon-gui-rectangle-in-3-axis/21537 "2021-06-09T17:05:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Escobar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/escobar/32/2726_2.png) [@Escobar](https://forum.babylonjs.com/u/Escobar)\
**Post date:** [June 9, 2021, 5:05pm UTC](https://forum.babylonjs.com/t/rotate-a-babylon-gui-rectangle-in-3-axis/21537/1 "2021-06-09T17:05:49Z")

</div>

I know that this is counter-intuitive but I wanna rotate a BABYLON.GUI.Rectangle in 3 axes, probably you want to ask me about using a regular plane but there are two reasons to avoid it:

- I need to be always on top over the rest of the scene.
- I need to have it resolution independent, I mean it should keep the same size independently from the distance to the camera.

So BABYLON.GUI.Rectangle meets all the requirements … but what happens if I want to orientate it?

Obviously if you know another way even using regular planes to do that it could be helpful!

Sample to play with (Babylon playground is addictive!)  
[https://playground.babylonjs.com/#UCE34F](https://playground.babylonjs.com/#UCE34F)

---

<div class="post-metadata">

**Author:** ![slin](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/slin/32/36084_2.png) [@slin](https://forum.babylonjs.com/u/slin)\
**Post date:** [June 9, 2021, 7:08pm UTC](https://forum.babylonjs.com/t/rotate-a-babylon-gui-rectangle-in-3-axis/21537/2 "2021-06-09T19:08:42Z")

</div>

3D rotation doesn’t seem to be possible. But you can rotate around z-axis.

[https://playground.babylonjs.com/#XCPP9Y#22](https://playground.babylonjs.com/#XCPP9Y#22)

Documentation: [The Babylon GUI | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/gui/gui#rotation-and-scaling)

---

<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:** [June 9, 2021, 7:25pm UTC](https://forum.babylonjs.com/t/rotate-a-babylon-gui-rectangle-in-3-axis/21537/3 "2021-06-09T19:25:20Z")

</div>

Perhaps you could use multi scenes [Using Multiple Scenes | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/scene/multiScenes) with a plane in the front scene and a fixed camera.
