Phew.. lots of transform matrix math over and I can finally get all 4 points of a Sprite, regardless of rotation, translation or scale of itself or any of its parents.

This commit is contained in:
Richard Davey
2013-09-01 05:29:53 +01:00
parent 12e5d2aceb
commit 6ef89826df
3 changed files with 14 additions and 18 deletions
+2 -1
View File
@@ -332,13 +332,14 @@ Phaser.Utils.Debug.prototype = {
this.start(x, y, color);
this.line('Local Transform');
// this.line('testX: ' + Math.floor(sprite.localTransform[3] + sprite.localTransform[0]));
this.line('skewX: ' + sprite.localTransform[3]);
this.line('skewY: ' + sprite.localTransform[1]);
this.line('scaleX: ' + sprite.localTransform[0]);
this.line('scaleY: ' + sprite.localTransform[4]);
this.line('transX: ' + sprite.localTransform[2]);
this.line('transY: ' + sprite.localTransform[5]);
this.line('sX: ' + sprite._sx);
this.line('sY: ' + sprite._sy);
},