mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
work in progress on Static Body offset functionality... should Sprite.setPosition(x,y) effect Sprites static body?
This commit is contained in:
parent
97cd94b3de
commit
8ee9805596
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue