diff --git a/README.md b/README.md index b23be1891..cee2870df 100644 --- a/README.md +++ b/README.md @@ -373,6 +373,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/ * Sound.play when using an AudioTag would ignore the muted state of the SoundManager and play regardless. It now checks the SoundManager.mute state on play, and sets the volume accorindingly (thanks @brianbunch #2139) * Graphics objects can now have a Physics Body directly attached to them, where-as before it would throw an error due to a lack of anchor property (thanks @NLilley #2400) * A Game Object with `fixedToCamera = true` that was then set for Input, and enabled for dragging from its center (`input.enableDrag(true)`) would throw an error upon being dragged (thanks @solusipse #2367) +* P2.World.updateBoundsCollisionGroup wouldn't use the `boundsCollisionGroup` mask if you passed `true` as the argument, only if it was left undefined. ### Pixi Updates diff --git a/src/physics/p2/World.js b/src/physics/p2/World.js index 450942618..753e69a97 100644 --- a/src/physics/p2/World.js +++ b/src/physics/p2/World.js @@ -615,9 +615,9 @@ Phaser.Physics.P2.prototype = { */ updateBoundsCollisionGroup: function (setCollisionGroup) { - var mask = this.everythingCollisionGroup.mask; + if (setCollisionGroup === undefined) { setCollisionGroup = true; } - if (setCollisionGroup === undefined) { mask = this.boundsCollisionGroup.mask; } + var mask = (setCollisionGroup) ? this.boundsCollisionGroup.mask : this.everythingCollisionGroup.mask; if (this.walls.left) {