Boundingbox Gizmo resets mesh rotation

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

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

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 :frowning: )

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

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?

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.

2 Likes