skip to Main Content

I just started making games with Phaser JS and want to know what other options are there for the default in the physics part of the config and what they do.

physics: {
    default: 'arcade',
    arcade: {
      gravity: { x: 50 },
      enableBody: true,
    }

I searched on the Phaser website but I couldn’t find much information.

2

Answers


  1. box2d, chipmunk, arcade, matter, ninja, p2

    https://phaser.io/docs/2.6.2/Phaser.Physics.html

    Login or Signup to reply.
  2. For Phaser 3 out of the box you can use matter(js) and arcade physics. (as @JasonGoemaat mentioned in the comments)
    If you are using phaser CE/2 the options on @1612Jacob would be the way to go.

    I personally would not recommend using phaser 2/CE for new projects.

    Here is a link to the official phaser examples for physics

    Tipp: I check the examples pages always, if I want to know some details, or some new functions. Phaser provides many examples and they are all pretty good.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search