Input#getLocalPosition()

getLocalPosition(displayObject, pointer) → {Phaser.Point}

This will return the local coordinates of the specified displayObject based on the given Pointer.

Parameters
Name Type Description
displayObject Phaser.Sprite | Phaser.Image

The DisplayObject to get the local coordinates for.

pointer Phaser.Pointer

The Pointer to use in the check against the displayObject.

Returns

A point containing the coordinates of the Pointer position relative to the DisplayObject.

Source code: input/Input.js (Line 902)
doc_phaser
2017-02-14 10:52:48
Comments
Leave a Comment

Please login to continue.