From 20cdb9ec99da42f61d767f2cff8f8a7644472a1f Mon Sep 17 00:00:00 2001 From: badlogic Date: Wed, 19 Jul 2017 13:57:20 +0200 Subject: [PATCH] [csharp] Fix applying flipping for noScale/noScaleOrReflection transform mode. See #951 --- spine-csharp/src/Bone.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spine-csharp/src/Bone.cs b/spine-csharp/src/Bone.cs index b74737c1bc..6a1ef642cb 100644 --- a/spine-csharp/src/Bone.cs +++ b/spine-csharp/src/Bone.cs @@ -246,14 +246,14 @@ public void UpdateWorldTransform (float x, float y, float rotation, float scaleX 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; } }