Phaser API Documentation

  Version: 
pointToContainer(source, [output])

Description:

Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties, and transforms it into the space of this Container, then returns it in the output object.

Parameters:

name type arguments description
source object | Phaser.Geom.Point | Phaser.Math.Vector2

The Source Point to be transformed.

output object | Phaser.Geom.Point | Phaser.Math.Vector2 <optional>

A destination object to store the transformed point in. If none given a Vector2 will be created and returned.

Returns:
Description:

The transformed point.

Since: 3.4.0