Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Path

getPoint(t, [out])

Description:

Calculates the coordinates of the point at the given normalized location (between 0 and 1) on the Path.

The location is relative to the entire Path, not to an individual Curve. A location of 0.5 is always in the middle of the Path and is thus an equal distance away from both its starting and ending points. In a Path with one Curve, it would be in the middle of the Curve; in a Path with two Curves, it could be anywhere on either one of them depending on their lengths.

Parameters:

name type arguments description
t number

The location of the point to return, between 0 and 1.

out Phaser.Math.Vector2 <optional>

The object in which to store the calculated point.

Returns:
Description:

The modified out object, or a new Vector2 if none was provided.

Since: 3.0.0
Source: src/curves/path/Path.js (Line 528)