[Phaser] 4. Physics

Start the physics engine

game.physics.startSystem(Phaser.ARCADE);

Enable an object for physics

game.physics.enable(sprite, Phaser.Physics.ARCADE);

Set velocity

this.char.body.velocity.setTo(200,200);

Set bounce

this.body.bounce.set(1,1);

Set Global Gravity

game.physics.arcade.gravity.y = 100;

Set object gravity

this.char.body.gravity.y = 50;

Set group physics

myGroup.enableBody = true;
myGroup.physicsBodyType = Phaser.Physics.ARCADE;