From 2ae113d5a0eb2d961ea80a4438c18367e5c265e6 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Mon, 6 Sep 2021 23:32:26 -0600 Subject: [PATCH] [ts] Fixed scale of constrained bones with transform constraint relative + local. --- spine-ts/spine-core/src/TransformConstraint.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-ts/spine-core/src/TransformConstraint.ts b/spine-ts/spine-core/src/TransformConstraint.ts index a1f39c1ed..766c36001 100644 --- a/spine-ts/spine-core/src/TransformConstraint.ts +++ b/spine-ts/spine-core/src/TransformConstraint.ts @@ -273,8 +273,8 @@ export class TransformConstraint implements Updatable { let rotation = bone.arotation + (target.arotation + this.data.offsetRotation) * mixRotate; let x = bone.ax + (target.ax + this.data.offsetX) * mixX; let y = bone.ay + (target.ay + this.data.offsetY) * mixY; - let scaleX = (bone.ascaleX * ((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX) + 1); - let scaleY = (bone.ascaleY * ((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY) + 1); + let scaleX = bone.ascaleX * (((target.ascaleX - 1 + this.data.offsetScaleX) * mixScaleX) + 1); + let scaleY = bone.ascaleY * (((target.ascaleY - 1 + this.data.offsetScaleY) * mixScaleY) + 1); let shearY = bone.ashearY + (target.ashearY + this.data.offsetShearY) * mixShearY; bone.updateWorldTransformWith(x, y, rotation, scaleX, scaleY, bone.ashearX, shearY);