[csharp] Port of commit ccc5b2f: Fixed root bone transform for skeleton scale to use world axes. See #1373.

This commit is contained in:
Harald Csaszar 2019-06-13 15:15:57 +02:00
parent 9860cc9eff
commit 79fea3722b

View File

@ -149,8 +149,8 @@ namespace Spine {
if (parent == null) { // Root bone.
float rotationY = rotation + 90 + shearY, sx = skeleton.scaleX, sy = skeleton.scaleY;
a = MathUtils.CosDeg(rotation + shearX) * scaleX * sx;
b = MathUtils.CosDeg(rotationY) * scaleY * sy;
c = MathUtils.SinDeg(rotation + shearX) * scaleX * sx;
b = MathUtils.CosDeg(rotationY) * scaleY * sx;
c = MathUtils.SinDeg(rotation + shearX) * scaleX * sy;
d = MathUtils.SinDeg(rotationY) * scaleY * sy;
worldX = x * sx + skeleton.x;
worldY = y * sy + skeleton.y;