work in progress on Static Body offset functionality... should Sprite.setPosition(x,y) effect Sprites static body?

This commit is contained in:
Joe Janiga 2018-04-11 00:16:08 -04:00
parent 97cd94b3de
commit 8ee9805596

View file

@ -443,8 +443,14 @@ var StaticBody = new Class({
this.world.staticTree.remove(this);
this.position.x -= this.offset.x;
this.position.y -= this.offset.y;
this.offset.set(x, y);
this.position.x += this.offset.x;
this.position.y += this.offset.y;
this.updateCenter();
this.world.staticTree.insert(this);