Phaser API Documentation

  Version: 
getWorldPoint(x, y, [output])

Description:

Converts the given x and y coordinates into World space, based on this Cameras transform. You can optionally provide a Vector2, or similar object, to store the results in.

Parameters:

name type arguments description
x number

The x position to convert to world space.

y number

The y position to convert to world space.

output object | Phaser.Math.Vector2 <optional>

An optional object to store the results in. If not provided a new Vector2 will be created.

Returns:
Description:

An object holding the converted values in its x and y properties.

Since: 3.0.0