How to find the angle in rotated mesh

Hi i want to find angle in rotated mesh…one of the top of the other mesh…Want to know angle in rotated mesh
image

You can do this using (Mesh).rotation.

To get the angle in degrees, use (Mesh).rotation.x*180/Math.PI or (Mesh).rotation.y*180/Math.PI (depending on the axis of rotation).

1 Like

image
I got 0 angle only…

So maybe rotationQuaternion of the mesh is set.
You can check if (Mesh).rotationQuaternion is null, if not, the mesh if using the quaternion to calculate its rotation, and you can use quaternion.toEulerAngles() to get the rotation.

2 Likes

Thank you so much… :smiling_face_with_three_hearts: @tanpopo

Maybe the rotation is on a parent or child mesh?

1 Like

Thank you… @Vortex
@tanpopo answer is working fine

again thank you @Vortex

Glad to help!
Just a note, you should mark solutions once your question is solved so anyone seeing the thread knows it was already resolved.

Yeah sure… @Vortex