I'm trying to do a very similar thing to what milos1290 was attempting in this thread viewtopic.php?f=7&t=3952
But it's not working for all bones for me.
Additionally, I've seen that I can pass in world coordinates and get different local coordinates when compared with the bone->x and bone->y locals coords.
When passing in the bone->x and bone->y I get the expected world coordinates! These two functions don't appear to be symmetrical!?
spBone_localToWorld (bone->parent, bone->x, bone->y, &worldX, &worldY);
spBone_worldToLocal (bone->parent, worldX, worldY, &localX, &localY);
The second function produces different localX and localY to bone->x and bone->y.
Why is this wrong? How are these functions expected to be called? It would be helpful if the parameter names for the bone had something other than 'self' too. It was not immediately obvious that I should pass in the parent bone.
Thanks
Jon