Skip to content

Commit 4d5a037

Browse files
committed
P2.World.updateBoundsCollisionGroup wouldn't use the boundsCollisionGroup mask if you passed true as the argument, only if it was left undefined.
1 parent 58af40c commit 4d5a037

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
373373
* 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)
374374
* 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)
375375
* 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)
376+
* P2.World.updateBoundsCollisionGroup wouldn't use the `boundsCollisionGroup` mask if you passed `true` as the argument, only if it was left undefined.
376377

377378
### Pixi Updates
378379

src/physics/p2/World.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ Phaser.Physics.P2.prototype = {
615615
*/
616616
updateBoundsCollisionGroup: function (setCollisionGroup) {
617617

618-
var mask = this.everythingCollisionGroup.mask;
618+
if (setCollisionGroup === undefined) { setCollisionGroup = true; }
619619

620-
if (setCollisionGroup === undefined) { mask = this.boundsCollisionGroup.mask; }
620+
var mask = (setCollisionGroup) ? this.boundsCollisionGroup.mask : this.everythingCollisionGroup.mask;
621621

622622
if (this.walls.left)
623623
{

0 commit comments

Comments
 (0)