Phaser API Documentation

  Version: 
hitTest(x, y)

Description:

Checks to see if a given x,y coordinate is colliding with this Static Body.

Parameters:

name type description
x number

The x coordinate to check against this body.

y number

The y coordinate to check against this body.

Returns:
Description:

true if the given coordinate lies within this body, otherwise false.

Type:
  • boolean
Since: 3.0.0