use gameObject's world position as the debug shape position

This commit is contained in:
scott.l 2020-02-11 00:34:38 +08:00
parent 58d40fa9e0
commit 10322fcd3a

View file

@ -2464,7 +2464,7 @@ var InputPlugin = new Class({
debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY);
debug.setRotation(gameObject.rotation);
debug.setScale(gameObject.scaleX, gameObject.scaleY);
debug.setPosition(gameObject.x + offsetx, gameObject.y + offsety);
debug.setPosition(gameObject.getWorldTransformMatrix().tx + offsetx, gameObject.getWorldTransformMatrix().ty + offsety);
debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY);
};