Phaser API Documentation

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

Description:

Takes the x and y values and returns a new position in the output vector that is the inverse of the current matrix with its transformation applied.

Can be used to translate points from world to local space.

Parameters:

name type arguments description
x number

The x position to translate.

y number

The y position to translate.

output Phaser.Math.Vector2 <optional>

A Vector2, or point-like object, to store the results in.

Returns:
Description:

The coordinates, inverse-transformed through this matrix.

Since: 3.12.0