Start tracking another object
objis a Sprite or Emitter
targetis a Display Object, a Pointer, or any object with
trackRotation: match the object’s
rotationto the target’s
rotateOffset: rotate the offset around the target by the target’s
disableBodyMoves: suspend the object’s physics movement while tracking
An Emitter moves its launch point (emitX, emitY) to follow the target. A Sprite moves its position.
The object stops tracking only if
- the target is destroyed; or
- a Pointer target is deactivated; or
- you call
It doesn't stop tracking if the target is killed.
It will not track while its own
exists is false.
- 1.0.0 (2018-02-21) — Changed
- 0.1.3 (2017-02-27) — First NPM release