diff --git a/examples/get_bounds.php b/examples/get_bounds.php
new file mode 100644
index 00000000..14ea1011
--- /dev/null
+++ b/examples/get_bounds.php
@@ -0,0 +1,51 @@
+
+
+
+ phaser.js - a new beginning
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js
index a6d057e5..ffa4458e 100644
--- a/src/gameobjects/Sprite.js
+++ b/src/gameobjects/Sprite.js
@@ -219,6 +219,26 @@ Phaser.Sprite.prototype.getLocalPosition = function(p, x, y) {
}
+Phaser.Sprite.prototype.getBounds = function(rect) {
+
+ rect = rect || new Phaser.Rectangle;
+
+ var left = Math.min(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x);
+ var right = Math.max(this.topLeft.x, this.topRight.x, this.bottomLeft.x, this.bottomRight.x);
+ var top = Math.min(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y);
+ var bottom = Math.max(this.topLeft.y, this.topRight.y, this.bottomLeft.y, this.bottomRight.y);
+
+ rect.x = left;
+ rect.y = top;
+ rect.width = right - left;
+ rect.height = bottom - top;
+
+ // This could work to include the children by running through the linked list and storing only the highest min.max values
+
+ return rect;
+
+}
+
Object.defineProperty(Phaser.Sprite.prototype, 'angle', {
get: function() {