Skip to content

Commit 95e2081

Browse files
committed
more p2 fixes
1 parent c611d51 commit 95e2081

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/physics/p2/Body.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Phaser.Physics.P2.Body.prototype = {
168168

169169
if (this.collideWorldBounds)
170170
{
171-
mask = this.game.physics.boundsCollisionGroup.mask;
171+
mask = this.game.physics.p2.boundsCollisionGroup.mask;
172172
}
173173

174174
for (var i = 0; i < this.collidesWith.length; i++)
@@ -628,9 +628,9 @@ Phaser.Physics.P2.Body.prototype = {
628628
*/
629629
addToWorld: function () {
630630

631-
if (this.data.world !== this.game.physics.world)
631+
if (this.data.world !== this.game.physics.p2.world)
632632
{
633-
this.game.physics.addBody(this);
633+
this.game.physics.p2.addBody(this);
634634
}
635635

636636
},
@@ -642,9 +642,9 @@ Phaser.Physics.P2.Body.prototype = {
642642
*/
643643
removeFromWorld: function () {
644644

645-
if (this.data.world === this.game.physics.world)
645+
if (this.data.world === this.game.physics.p2.world)
646646
{
647-
this.game.physics.removeBody(this);
647+
this.game.physics.p2.removeBody(this);
648648
}
649649

650650
},

0 commit comments

Comments
 (0)