Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Namespace: PathFollower
Phaser.Types.GameObjects.PathFollower

Type Definitions

PathConfig
Focus
Focus

Description:

Settings for a PathFollower.

Properties:
name type arguments Default description
duration number <optional> 1000

The duration of the path follow in ms. Must be > 0.

from number <optional> 0

The start position of the path follow, between 0 and 1. Must be less than to.

to number <optional> 1

The end position of the path follow, between 0 and 1. Must be more than from.

positionOnPath boolean <optional> false

Whether to position the PathFollower on the Path using its path offset.

rotateToPath boolean <optional> false

Should the PathFollower automatically rotate to point in the direction of the Path?

rotationOffset number <optional> 0

If the PathFollower is rotating to match the Path, this value is added to the rotation value. This allows you to rotate objects to a path but control the angle of the rotation as well.

startAt number <optional> 0

Current start position of the path follow, must be between from and to.

Type:
object
Focus
Focus