InputManager.getLocalPosition(displayObject, pointer, output) will return the local coordinates of the specified displayObject and pointer.

InputManager.hitTest will test for pointer hits against a Sprite/Image, its hitArea (if set) or any of its children.
This commit is contained in:
photonstorm
2014-02-07 18:01:58 +00:00
parent bc3a3fd43d
commit dd43d59cce
4 changed files with 294 additions and 361 deletions
+1 -1
View File
@@ -498,7 +498,7 @@ Phaser.InputHandler.prototype = {
}
// Need to pass it a temp point, in case we need it again for the pixel check
if (this.game.input.hitTest(this.sprite, pointer))
if (this.game.input.hitTest(this.sprite, pointer, this._tempPoint))
{
return true;
}