Phaser API Documentation

  Version: 
hasFaceAt(x, y, [camera])

Description:

Tests to see if any face in this Mesh intersects with the given coordinates.

The given position is translated through the matrix of this Mesh and the given Camera, before being compared against the vertices.

Parameters:

name type arguments description
x number

The x position to check against.

y number

The y position to check against.

camera Phaser.Cameras.Scene2D.Camera <optional>

The camera to pass the coordinates through. If not give, the default Scene Camera is used.

Returns:
Description:

Returns true if any face of this Mesh intersects with the given coordinate, otherwise false.

Type:
  • boolean
Since: 3.60.0