Phaser API Documentation

  Version: 
<static> GetLineToRectangle(line, rect, [out])

Description:

Checks for intersection between the Line and a Rectangle shape, and returns the intersection points as a Point object array.

Parameters:

name type arguments description
line Phaser.Geom.Line

The Line to check for intersection.

rect object | Phaser.Geom.Rectangle

The Rectangle to check for intersection.

out array <optional>

An optional array in which to store the points of intersection.

Returns:
Description:

An array with the points of intersection if objects intersect, otherwise an empty array.

Type:
  • array
Since: 3.0.0