Skip to content

Commit b48247d

Browse files
committed
Body now wakes from direct velocity property modification
1 parent ad9a0fa commit b48247d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,11 @@ var Body = new Class({
15691569
}
15701570
}
15711571
}
1572+
else if (this.sleeping && !this.velocity.equals(this.prevVelocity))
1573+
{
1574+
console.log('body woken from significant change in velocity =', this.velocity.y);
1575+
this.wake();
1576+
}
15721577

15731578
this._sleepX = this.x;
15741579
this._sleepY = this.y;

0 commit comments

Comments
 (0)