I'm using Spine Runtimes Version 2.1
Here's the code from the newSkinnedMeshAttachment function, in the if (subTexture) block:
ORIGINAL CODE:
There's definitely a type-o here. regionV2 is referencing matrix.tx, as is regionU2. I thought I'd found my issue! I fixed it to use matrix.ty but that didn't change much at all. (read on)
attachment.regionU = matrix.tx / root.width;
attachment.regionV = matrix.ty / root.height;
attachment.regionU2 = (matrix.tx + subTexture.width) / root.width;
attachment.regionV2 = (matrix.tx + subTexture.height) / root.height;
NEW CODE:
Looking into that original code more, it's making the assumption that the tx and ty values in the matrix are in texture-space, or pixels, so it's dividing by root width and height. However, matrix tx and ty are already in UV space between 0.0 and 1.0. So, I changed the code to the following, and now I get the right image in my test.
attachment.regionU = matrix.tx;
attachment.regionV = matrix.ty;
attachment.regionU2 = matrix.tx + (subTexture.width / root.width);
attachment.regionV2 = matrix.ty + (subTexture.height / root.height);
This begs the question: Is my version of Starling too old (version 1.3)? Have sub-texture transformation matrixes changed? Or is this a real, current bug? Please let me know if there's any more info I can supply to be helpful.
Thanks!