Phaser API Documentation

  Version: 
<static> LineToCircle(line, circle, [nearest])

Description:

Checks for intersection between the line segment and circle.

Based on code by Matt DesLauriers.

Parameters:

name type arguments description
line Phaser.Geom.Line

The line segment to check.

circle Phaser.Geom.Circle

The circle to check against the line.

nearest any | Phaser.Geom.Point <optional>

An optional Point-like object. If given the closest point on the Line where the circle intersects will be stored in this object.

Returns:
Description:

true if the two objects intersect, otherwise false.

Type:
  • boolean
Since: 3.0.0