Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Path

moveTo(x, [y])

Description:

Creates a "gap" in this path from the path's current end point to the given coordinates.

After calling this function, this Path's end point will be equal to the given coordinates

Parameters:

name type arguments description
x number | Phaser.Math.Vector2

The X coordinate of the position to move the path's end point to, or a Vector2 containing the entire new end point.

y number <optional>

The Y coordinate of the position to move the path's end point to, if a number was passed as the X coordinate.

Returns:
Description:

This Path object.

Since: 3.0.0
Source: src/curves/path/Path.js (Line 780)