Skip to content

Commit 9a34840

Browse files
committed
Update center after separation
1 parent fc58d66 commit 9a34840

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/physics/arcade/Body.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,8 @@ var Body = new Class({
23312331
{
23322332
this.x += x;
23332333

2334+
this.updateCenter();
2335+
23342336
if (vx !== null)
23352337
{
23362338
this.velocity.x = vx;
@@ -2365,6 +2367,8 @@ var Body = new Class({
23652367
{
23662368
this.y += y;
23672369

2370+
this.updateCenter();
2371+
23682372
if (vy !== null)
23692373
{
23702374
this.velocity.y = vy;

0 commit comments

Comments
 (0)