# Boundingbox Gizmo resets mesh rotation

**URL:** <https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376>\
**Category:** Bugs\
**Tags:** gizmo\
**Created:** [September 22, 2023, 8:54pm UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376 "2023-09-22T20:54:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DukeVen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dukeven/32/34217_2.png) [@DukeVen](https://forum.babylonjs.com/u/DukeVen)\
**Post date:** [September 22, 2023, 8:54pm UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/1 "2023-09-22T20:54:44Z")

</div>

Attaching the bounding box gizmo to a mesh will automatically reset all mesh rotation values to 0.

Visual rotation is not reset for some reason, but the rotation values are.

PG: [https://playground.babylonjs.com/#JI399Z](https://playground.babylonjs.com/#JI399Z)

Open console, see rotation x value before attaching gizmo to mesh using pointer, and then check rotation value again after attaching.

---

<div class="post-metadata">

**Author:** ![DukeVen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dukeven/32/34217_2.png) [@DukeVen](https://forum.babylonjs.com/u/DukeVen)\
**Post date:** [September 22, 2023, 8:55pm UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/2 "2023-09-22T20:55:03Z")

</div>

tagging @Cedric  
(this was an issue before the recent merge by the way, but I thought it was on my end then, hence the late report ☹ )

---

<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:** [September 22, 2023, 9:45pm UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/3 "2023-09-22T21:45:24Z")

</div>



---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [September 25, 2023, 6:34am UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/4 "2023-09-25T06:34:18Z")

</div>

Not a bug. `rotationQuaternion` is used instead of Euler values when a gizmo is attached.

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [September 25, 2023, 6:52am UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/5 "2023-09-25T06:52:38Z")

</div>



---

<div class="post-metadata">

**Author:** ![DukeVen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dukeven/32/34217_2.png) [@DukeVen](https://forum.babylonjs.com/u/DukeVen)\
**Post date:** [September 25, 2023, 8:39am UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/6 "2023-09-25T08:39:56Z")

</div>

Why is this only the case for the bounding box gizmo? And is there anyway to force it to use euler angles instead of rotationQuaternions?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [September 25, 2023, 8:51am UTC](https://forum.babylonjs.com/t/boundingbox-gizmo-resets-mesh-rotation/44376/7 "2023-09-25T08:51:31Z")

</div>

I guess it’s the case for legacy reasons that may have its roots before I joined the team.  
This said, if you want to discard quaternion, ondragend observable, convert the quaternion to euler and set rotationquaternion to nul.
