image

If you've been using Phaser, then chances are you would be familiar with the Arcade physics system. Arcade is the de facto physics system used with Phaser and provides a basic physics system that allows for collisions, acceleration, velocity and so on.

Phaser has 3 physics systems available:

  • Arcade Physics
  • Ninja Physics
  • P2 Physics

You can read more about the Nina Physics system here, but in this tutorial we will be looking at how to use the P2 physics system in Phaser with the help of the PhysicsEditor.

P2 Physics allows us to create much more complex physics interactions (things like springs and pendulums) and it also allows for much more complex collisions. When using the Arcade Physics system, the hitbox for a sprite will always be a simple bounding rectangle. This is fine in some instances, but take the following sprite for example:

Read More