mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 05:09:07 +08:00
[csharp] Fix applying flipping for noScale/noScaleOrReflection transform mode. See #951
This commit is contained in:
parent
8f6725db33
commit
20cdb9ec99
@ -246,14 +246,14 @@ namespace Spine {
|
|||||||
float lb = MathUtils.CosDeg(90 + shearY) * scaleY;
|
float lb = MathUtils.CosDeg(90 + shearY) * scaleY;
|
||||||
float lc = MathUtils.SinDeg(shearX) * scaleX;
|
float lc = MathUtils.SinDeg(shearX) * scaleX;
|
||||||
float ld = MathUtils.SinDeg(90 + shearY) * scaleY;
|
float ld = MathUtils.SinDeg(90 + shearY) * scaleY;
|
||||||
|
if (data.transformMode != TransformMode.NoScaleOrReflection? pa * pd - pb* pc< 0 : skeleton.flipX != skeleton.flipY) {
|
||||||
|
zb = -zb;
|
||||||
|
zd = -zd;
|
||||||
|
}
|
||||||
a = za * la + zb * lc;
|
a = za * la + zb * lc;
|
||||||
b = za * lb + zb * ld;
|
b = za * lb + zb * ld;
|
||||||
c = zc * la + zd * lc;
|
c = zc * la + zd * lc;
|
||||||
d = zc * lb + zd * ld;
|
d = zc * lb + zd * ld;
|
||||||
if (data.transformMode != TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : skeleton.flipX != skeleton.flipY) {
|
|
||||||
b = -b;
|
|
||||||
d = -d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user