Phaser API Documentation

  Version: 
<static> GetRectangleToTriangle(rect, triangle, [out])

Description:

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

Parameters:

name type arguments description
rect Phaser.Geom.Rectangle

Rectangle object to test.

triangle Phaser.Geom.Triangle

Triangle object to test.

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
Examples: