diff --git a/src/core/display/Transform.js b/src/core/display/Transform.js index 5adcabc..35ed5e6 100644 --- a/src/core/display/Transform.js +++ b/src/core/display/Transform.js @@ -96,8 +96,6 @@ */ updateTransform(parentTransform) { - const pt = parentTransform.worldTransform; - const wt = this.worldTransform; const lt = this.localTransform; lt.a = this._cx * this.scale.x; @@ -109,6 +107,9 @@ lt.ty = this.position.y - ((this.pivot.x * lt.b) + (this.pivot.y * lt.d)); // concat the parent matrix with the objects transform. + const pt = parentTransform.worldTransform; + const wt = this.worldTransform; + wt.a = (lt.a * pt.a) + (lt.b * pt.c); wt.b = (lt.a * pt.b) + (lt.b * pt.d); wt.c = (lt.c * pt.a) + (lt.d * pt.c);