Skip to content

Commit bef0b16

Browse files
committed
Clear snapTo
1 parent 34ed8f0 commit bef0b16

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,7 @@ var Body = new Class({
988988
this.overlapX = 0;
989989
this.overlapY = 0;
990990

991+
this.snapTo = null;
991992
this.embedded = false;
992993
this.forcePosition = 0;
993994

@@ -2307,7 +2308,7 @@ var Body = new Class({
23072308
return this;
23082309
}
23092310

2310-
if (body2 && !collisionInfo.set)
2311+
if (body2 && !collisionInfo.set && !this.snapTo)
23112312
{
23122313
console.log(this.gameObject.name, 'setBlockedUp', body2.bottom);
23132314

@@ -2352,7 +2353,7 @@ var Body = new Class({
23522353
return this;
23532354
}
23542355

2355-
if (body2 && !collisionInfo.set)
2356+
if (body2 && !collisionInfo.set && !this.snapTo)
23562357
{
23572358
console.log(this.gameObject.name, 'setBlockedDown', body2.y);
23582359

0 commit comments

Comments
 (0)