Phaser API Documentation

  Version: 
<static> OffsetPoint(rect, point)

Description:

Nudges (translates) the top-left corner of a Rectangle by the coordinates of a point (translation vector).

Parameters:

name type description
rect Phaser.Geom.Rectangle

The Rectangle to adjust.

point Phaser.Geom.Point | Phaser.Math.Vector2

The point whose coordinates should be used as an offset.

Returns:
Description:

The adjusted Rectangle.

Since: 3.0.0