The current implementation of this function doesn't support non-uniform scaling values, and doesn't support the "flipping" of sprites via a negative scaling. I've found a fix on this forum for the latter, but the former I couldn't find any solution for. I've managed to solve the issue myself, so I would recommend anyone implementing the reference to use this version instead:
Hope this saves someone a lot of time and frustration.
This solution sadly doesn't preserve the Sprite structure when rotating and using non-uniform scaling at the same time. However, I've tested every other case and it works. I would imagine a perfect solution would scale the root bone around the axis of rotation, and leave the rest of the child rotations untouched, but I haven't gotten it to work yet.
scml documentation (deprecated - use reference implementations instead)
in Spriter Implementations
Posted
I've been writing Spriter integration into my own engine, and I think I've discovered and solved an error in the reference.
The issue lies in the applying of a parent's transform onto child bones:
The current implementation of this function doesn't support non-uniform scaling values, and doesn't support the "flipping" of sprites via a negative scaling. I've found a fix on this forum for the latter, but the former I couldn't find any solution for. I've managed to solve the issue myself, so I would recommend anyone implementing the reference to use this version instead:
Hope this saves someone a lot of time and frustration.
This solution sadly doesn't preserve the Sprite structure when rotating and using non-uniform scaling at the same time. However, I've tested every other case and it works. I would imagine a perfect solution would scale the root bone around the axis of rotation, and leave the rest of the child rotations untouched, but I haven't gotten it to work yet.