Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Line

getPoint(position, [output])

Description:

Get a point on a line that's a given percentage along its length.

Parameters:

name type arguments description
position number

A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.

output object | Phaser.Geom.Point <optional>

An optional point, or point-like object, to store the coordinates of the point on the line.

Returns:
Description:

A Point, or point-like object, containing the coordinates of the point on the line.

Type:
Since: 3.0.0
Source: src/geom/line/Line.js (Line 87)