From 3422569a4ad08f5086c2eea499746051c6a71775 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 9 Feb 2018 15:21:39 +0000 Subject: [PATCH] setFrame will use a custom pivot, if set. --- src/gameobjects/components/Texture.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gameobjects/components/Texture.js b/src/gameobjects/components/Texture.js index d51df4b68..65cd3feca 100644 --- a/src/gameobjects/components/Texture.js +++ b/src/gameobjects/components/Texture.js @@ -75,6 +75,11 @@ var Texture = { this.renderFlags |= _FLAG; } + if (this.frame.customPivot) + { + this.setOrigin(this.frame.pivotX, this.frame.pivotY); + } + return this; }