Skip to content

About

Track another object's position

Topics

Resources

Stars

11 stars

Watchers

3 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

Repository files navigation

Phaser 3 Follow Plugin

new Phaser.Game({
  plugins: {
    scene: [{ key: 'FollowPlugin', plugin: PhaserFollowPlugin, mapping: 'follow' }]
  }
});

PhaserFollowPlugin is a global reference to the plugin class. The package module exports the same value.

In a scene:

this.follow.add(follower, {
  target: target, // Required.
  offsetX: 0,
  offsetY: 0,
  rotate: false,
  rotateOffset: false
});

this.follow.pause(follower);

this.follow.resume(follower);

this.follow.remove(follower);

About

Track another object's position

Topics

Resources

Stars

11 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages