Phaser API Documentation

  Version: 
<static> PointToLine(point, line, [lineThickness])

Description:

Checks if the a Point falls between the two end-points of a Line, based on the given line thickness.

Assumes that the line end points are circular, not square.

Parameters:

name type arguments Default description
point any | Phaser.Geom.Point

The point, or point-like object to check.

line Phaser.Geom.Line

The line segment to test for intersection on.

lineThickness number <optional> 1

The line thickness. Assumes that the line end points are circular.

Returns:
Description:

true if the Point falls on the Line, otherwise false.

Type:
  • boolean
Since: 3.0.0