Merge pull request #3300 from pixelpicosean/master

Bug fix: arcade body does not align with scaled parent object
This commit is contained in:
Richard Davey 2018-03-01 02:48:45 +00:00 committed by GitHub
commit d8eeb3b760
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -788,8 +788,8 @@ var Body = new Class({
var sprite = this.gameObject;
this.position.x = sprite.x - sprite.displayOriginX + (sprite.scaleX * this.offset.x);
this.position.y = sprite.y - sprite.displayOriginY + (sprite.scaleY * this.offset.y);
this.position.x = sprite.x + sprite.scaleX * (this.offset.x - sprite.displayOriginX);
this.position.y = sprite.y + sprite.scaleY * (this.offset.y - sprite.displayOriginY);
this.updateCenter();