Phaser API Documentation

  Version: 
getBottomLeft(body, [x], [y])

Description:

Takes a Body and returns the world coordinates of the bottom-left of its bounds.

Body bounds are updated by Matter each step and factor in scale and rotation. This will return the world coordinate based on the bodies current position and bounds.

Parameters:

name type arguments description
body Phaser.Types.Physics.Matter.MatterBody

The Body to get the position from.

x number <optional>

Optional horizontal offset to add to the returned coordinates.

y number <optional>

Optional vertical offset to add to the returned coordinates.

Returns:
Description:

A Vector2 containing the coordinates, or false if it was unable to parse the body.

Type:
Since: 3.22.0