Phaser API Documentation

  Version: 
<static> GetTriangleToCircle(triangle, circle, [out])

Description:

Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.

A Circle intersects a Triangle if its center is located within it or if any of the Triangle's sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.

Parameters:

name type arguments description
triangle Phaser.Geom.Triangle

The Triangle to check for intersection.

circle Phaser.Geom.Circle

The Circle 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