[csharp] Fixed disable inherit scale.

Based on: cb5e05008a
Issue: #1224
This commit is contained in:
pharan 2018-12-10 02:18:25 +08:00 committed by GitHub
parent dec9b1eb5d
commit 6abcac3882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,6 +217,9 @@ namespace Spine {
za *= s;
zc *= s;
s = (float)Math.Sqrt(za * za + zc * zc);
if (data.transformMode == TransformMode.NoScale
&& (pa * pd - pb * pc < 0) != (skeleton.scaleX < 0 != skeleton.scaleY < 0)) s = -s;
float r = MathUtils.PI / 2 + MathUtils.Atan2(zc, za);
float zb = MathUtils.Cos(r) * s;
float zd = MathUtils.Sin(r) * s;