Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Point

<static> Project(pointA, pointB, [out])

Description:

Calculates the vector projection of pointA onto the nonzero pointB. This is the orthogonal projection of pointA onto a straight line parallel to pointB.

Parameters:

name type arguments description
pointA Phaser.Geom.Point

Point A, to be projected onto Point B.

pointB Phaser.Geom.Point

Point B, to have Point A projected upon it.

out Phaser.Geom.Point <optional>

The Point object to store the position in. If not given, a new Point instance is created.

Returns:
Description:

A Point object holding the coordinates of the vector projection of pointA onto pointB.

Since: 3.0.0
Source: src/geom/point/Project.js (Line 10)