Pointer has two new properties worldX and worldY which contain the position of the Pointer, translated into the coordinate space of the most recent Camera it interacted with.

This commit is contained in:
Richard Davey 2018-06-04 13:23:27 +01:00
parent 15af7c6d0c
commit 285b811625

View file

@ -56,7 +56,7 @@ var Pointer = new Class({
* [description]
*
* @name Phaser.Input.Pointer#event
* @type {null}
* @type {any}
* @since 3.0.0
*/
this.event;
@ -97,6 +97,26 @@ var Pointer = new Class({
*/
this.position = new Vector2();
/**
* The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
*
* @name Phaser.Input.Pointer#worldX
* @type {number}
* @default 0
* @since 3.10.0
*/
this.worldX = 0;
/**
* The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.
*
* @name Phaser.Input.Pointer#worldY
* @type {number}
* @default 0
* @since 3.10.0
*/
this.worldY = 0;
/**
* X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.
*