diff --git a/src/gameobjects/particles/ParticleEmitterWebGLRenderer.js b/src/gameobjects/particles/ParticleEmitterWebGLRenderer.js index 8c7afdd85..de7fa765c 100644 --- a/src/gameobjects/particles/ParticleEmitterWebGLRenderer.js +++ b/src/gameobjects/particles/ParticleEmitterWebGLRenderer.js @@ -75,8 +75,9 @@ var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMa camera.addToRenderList(emitter); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + camMatrix.copyFrom(camera.matrix); + + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * emitter.scrollFactorX, -camera.scrollY * emitter.scrollFactorY); renderer.setBlendMode(emitter.blendMode); @@ -102,10 +103,6 @@ var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMa particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - camMatrix.copyFrom(camera.matrix); - - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - // Undo the camera scroll particleMatrix.e = particle.x; particleMatrix.f = particle.y;