Skip to content

Commit

Permalink
[csharp] Fix applying flipping for noScale/noScaleOrReflection transf…
Browse files Browse the repository at this point in the history
…orm mode. See EsotericSoftware#951
  • Loading branch information
badlogic committed Jul 19, 2017
1 parent 522c16a commit a4593be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Bone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ public class Bone : IUpdatable {
float lb = MathUtils.CosDeg(90 + shearY) * scaleY;
float lc = MathUtils.SinDeg(shearX) * scaleX;
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;
b = za * lb + zb * ld;
c = zc * la + zd * lc;
d = zc * lb + zd * ld;
if (data.transformMode != TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : skeleton.flipX != skeleton.flipY) {
b = -b;
d = -d;
}
d = zc * lb + zd * ld;
return;
}
}
Expand Down

0 comments on commit a4593be

Please sign in to comment.