Skip to content

Commit a90ab2e

Browse files
committed
P2 bounds now collides with everything by default
1 parent 74b1189 commit a90ab2e

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/physics/Physics.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ Phaser.Physics.prototype = {
153153
throw new Error('The Chipmunk physics system has not been implemented yet.');
154154
}
155155

156-
this.setBoundsToWorld();
157-
158156
},
159157

160158
/**

src/physics/arcade/World.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ Phaser.Physics.Arcade = function (game) {
146146
*/
147147
this._dy = 0;
148148

149+
// By default we want the bounds the same size as the world bounds
150+
this.setBoundsToWorld();
151+
149152
};
150153

151154
Phaser.Physics.Arcade.prototype.constructor = Phaser.Physics.Arcade;

src/physics/ninja/World.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Phaser.Physics.Ninja = function (game) {
6464
*/
6565
this.quadTree = new Phaser.QuadTree(this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);
6666

67+
// By default we want the bounds the same size as the world bounds
68+
this.setBoundsToWorld();
69+
6770
};
6871

6972
Phaser.Physics.Ninja.prototype.constructor = Phaser.Physics.Ninja;

0 commit comments

Comments
 (0)