Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Polygon

<static> ContainsPoint(polygon, point)

Description:

Checks the given Point again the Polygon to see if the Point lays within its vertices.

Parameters:

name type description
polygon Phaser.Geom.Polygon

The Polygon to check.

point Phaser.Geom.Point

The Point to check if it's within the Polygon.

Returns:
Description:

true if the Point is within the Polygon, otherwise false.

Type:
  • boolean
Examples:
Since: 3.0.0