Phaser API Documentation

  Version: 
enableAttractorPlugin()

Description:

Enables the Matter Attractors Plugin.

The attractors plugin that makes it easy to apply continual forces on bodies. It's possible to simulate effects such as wind, gravity and magnetism.

https://github.com/liabru/matter-attractors

This method is called automatically if plugins.attractors is set in the Matter World Config. However, you can also call it directly from within your game.

Returns:
Description:

This Matter Physics instance.

Since: 3.0.0