Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> RotateTo(point, x, y, angle, distance)

Description:

Position a point at the given angle and distance to (x, y).

Parameters:

name type description
point Phaser.Types.Math.Vector2Like

The point to be positioned.

x number

The horizontal coordinate to position from.

y number

The vertical coordinate to position from.

angle number

The angle of rotation in radians.

distance number

The distance from (x, y) to place the point at.

Returns:
Description:

The given point.

Examples:
Since: 3.24.0
Source: src/math/RotateTo.js (Line 7)