Phaser API Documentation

  Version: 
setPath(path, [config])

Description:

Set the Path that this PathFollower should follow.

Optionally accepts Phaser.Types.GameObjects.PathFollower.PathConfig settings.

Parameters:

name type arguments description
path Phaser.Curves.Path

The Path this PathFollower is following. It can only follow one Path at a time.

config number | Phaser.Types.GameObjects.PathFollower.PathConfig | Phaser.Types.Tweens.NumberTweenBuilderConfig <optional>

Settings for the PathFollower.

Returns:
Description:

This Game Object.

Since: 3.0.0