How i get local rotation coordinates

sorry for such a question but can someone help to get local rotation for a mesh
in this PG i rotate the box locally but when i try to see it in the console i get zeros.
https://playground.babylonjs.com/#FK4FIS

there is anyway i can get the local rotation of a mesh please ?

Using the rotate method will switch your mesh to the “quaternion” mode, meaning mesh.rotation is not used anymore but mesh.rotationQuaternion is used instead:

https://playground.babylonjs.com/#FK4FIS#1

1 Like

Using ‘rotate’ sets the orientation using a rotationQuaternion which sets the rotation property to zero.

The use of rotate sets the orientation of the mesh using a rotation quaternion and subsequently there can then be issues trying to set the orientation of the mesh using rotation .

From the docs

You can obtain the rotationQuaternion and from that the Euler angles Rotation Quaternions | Babylon.js Documentation

1 Like