From faf9fbfa379cbbccd03fe332ccb8b57a1f14e9c7 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 5 Apr 2019 20:27:46 +0100 Subject: [PATCH] tweaked 'disable inherit scale' check --- src/core/Bone.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/Bone.ts b/src/core/Bone.ts index 92541303..5a5fe052 100644 --- a/src/core/Bone.ts +++ b/src/core/Bone.ts @@ -178,6 +178,12 @@ namespace pixi_spine.core { za *= s; zc *= s; s = Math.sqrt(za * za + zc * zc); + if ( + this.data.transformMode == TransformMode.NoScale + && (pa * pd - pb * pc < 0) != (Bone.yDown? + (this.skeleton.scaleX < 0 != this.skeleton.scaleY > 0) : + (this.skeleton.scaleX < 0 != this.skeleton.scaleY < 0)) + ) s = -s; let r = Math.PI / 2 + Math.atan2(zc, za); let zb = Math.cos(r) * s; let zd = Math.sin(r) * s;