mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
[csharp] Port of commit ccc5b2f: Fixed root bone transform for skeleton scale to use world axes. See #1373.
This commit is contained in:
parent
ccc5b2f38b
commit
8cfe6be2c0
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user