From 40b968028aa81ad896c61536f4c993c98133c23b Mon Sep 17 00:00:00 2001 From: Betsy Cottonflop Date: Sat, 28 Sep 2013 16:52:37 -0700 Subject: [PATCH] Fix for incorrect new particle positioning --- src/gameobjects/Sprite.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/Sprite.js b/src/gameobjects/Sprite.js index b0dc29a4..dbb2337a 100644 --- a/src/gameobjects/Sprite.js +++ b/src/gameobjects/Sprite.js @@ -363,8 +363,8 @@ Phaser.Sprite.prototype.reset = function(x, y) { this.x = x; this.y = y; - this.position.x = x; - this.position.y = y; + this.position.x = this.x - (this.game.world.camera.x * this.scrollFactor.x); + this.position.y = this.y - (this.game.world.camera.y * this.scrollFactor.y); this.alive = true; this.exists = true; this.visible = true;