• Editor
  • Why does the sprite rotation angle not display correctly when using a grid?

A simple example.
There is one sprite - it will be used in each of the skins.
There is a skeleton with 1 bone and 1 slot (skin placeholder).
There are 2 skins - skin 1 and skin 2.

We switch to skin1 and drag the sprite into the skin placeholder. We set the rotation, for example 15 degrees (it doesn't matter absolute, local, parent).

We switch to skin 2 and drag the sprite into the skin placeholder.
Set the rotation, for example 0 degrees.

We can see that the sprites are rotated at different angles.

We switch to skin1 and add a mesh to the sprite and generate vertices.
We switch to skin2 and add a mesh to the sprite, generate vertices.

After generating the meshes, for both sprites their rotation angle in the editor is the same. Why?

Without meshes (for example, if we delete them), we see the correct values in the editor. After generating the meshes, we see values that mislead us. For example, the rotation angle of both sprites is 15 degrees, when the second sprite has a rotation angle of 0.

Related Discussions
...

The issue you're experiencing with sprite rotation angles not displaying correctly when using a grid in Spine is related to how Spine handles mesh attachments. When you convert a region attachment to a mesh attachment, the rotation of the region attachment is taken as the initial rotation for the mesh. However, once you start manipulating the mesh vertices, the rotation value becomes more of a reference rather than an absolute measure. This is because a mesh is essentially a collection of vertices, and when you rotate the mesh, you're actually translating these vertices in a circular path. The rotation value displayed in the editor is a reference to how much the vertices have been rotated as a whole, but it doesn't necessarily reflect the individual transformations applied to each vertex. This can lead to confusion when comparing the rotation values of different skins, especially after generating meshes.

To address this, you can use the "Freeze" option in the mesh properties to reset the mesh rotation to zero, which can help in maintaining consistency across different skins. Additionally, be aware that the rotation value is more of a guideline and may not accurately represent the visual rotation of the mesh if vertices have been manipulated individually.