diff --git a/src/input/Pointer.js b/src/input/Pointer.js index e8a019696..a8225b104 100644 --- a/src/input/Pointer.js +++ b/src/input/Pointer.js @@ -174,6 +174,11 @@ Phaser.Pointer = function (game, id) { * @property {Phaser.Point} positionDown - A Phaser.Point object containing the x/y values of the pointer when it was last in a down state on the display. */ this.positionDown = new Phaser.Point(); + + /** + * @property {Phaser.Point} positionUp - A Phaser.Point object containing the x/y values of the pointer when it was last released. + */ + this.positionUp = new Phaser.Point(); /** * A Phaser.Circle that is centered on the x/y coordinates of this pointer, useful for hit detection. @@ -489,7 +494,9 @@ Phaser.Pointer.prototype = { this.withinGame = false; this.isDown = false; this.isUp = true; - + + this.positionUp.setTo(this.x, this.y); + if (this.isMouse === false) { this.game.input.currentPointers--;