[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 ccc5b2f38b
commit 8cfe6be2c0

View File

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