Hey,
I'm trying to understand the relationship between the rotation of a bone and the corresponding attachment (image). You may remember me from such episodes as "Generic runtime for Java/Android" (viewtopic.php?f=7&t=1433).
So I am just using the SRT values of a bone in my own rendering engine, but the rotation values are causing problems for me. In the SpineBoy demo, for example, the torso attachment has no rotation itself, but the bone does:
http://cl.ly/image/3v3p2u2D2p45
"skins": {
"default": {
...
"torso": {
"torso": { "x": 44.57, "y": -7.08, "rotation": -94.95, "width": 68, "height": 92 }
}
And the bone for the torso is listed as:
{ "name": "torso", "parent": "hip", "length": 85.82, "x": -6.42, "y": 1.97, "rotation": 94.95 }
Now obviously these two rotation values cancel to 0, but I just want to make sure I understand the relationship here.
Currently I'm rendering the images along with the value of the "worldRotation" and although their motion appears to be correct (i.e. the amount of delta rotation in each frame) some of the images are just, well wrong:
http://cl.ly/image/1b3e0i0m1S1I
Can I safely assume that in order to correctly render an image I take the worldRotation and adjust it by whatever value is in the skin for that bone?