Phaser API Documentation

  Version: 
hitTest(x, y)

Description:

Tests if the coordinates are within this Body.

Parameters:

name type description
x number

The horizontal coordinate.

y number

The vertical coordinate.

Returns:
Description:

True if (x, y) is within this Body.

Type:
  • boolean
Since: 3.0.0