From 32489714115f48f361e7e2b163ab6750433048a0 Mon Sep 17 00:00:00 2001 From: samme Date: Sun, 21 Feb 2021 11:30:32 -0800 Subject: [PATCH] Fix wrong particle follow position Fixes #5457 --- src/gameobjects/particles/ParticleManagerCanvasRenderer.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gameobjects/particles/ParticleManagerCanvasRenderer.js b/src/gameobjects/particles/ParticleManagerCanvasRenderer.js index 837ed929d..9ca4918e0 100644 --- a/src/gameobjects/particles/ParticleManagerCanvasRenderer.js +++ b/src/gameobjects/particles/ParticleManagerCanvasRenderer.js @@ -69,9 +69,6 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, camera.addToRenderList(emitter); - var followX = (emitter.follow) ? emitter.follow.x + emitter.followOffset.x : 0; - var followY = (emitter.follow) ? emitter.follow.y + emitter.followOffset.y : 0; - var scrollFactorX = emitter.scrollFactorX; var scrollFactorY = emitter.scrollFactorY; @@ -94,7 +91,7 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, camMatrix.copyFrom(camera.matrix); - camMatrix.multiplyWithOffset(managerMatrix, followX + -camera.scrollX * scrollFactorX, followY + -camera.scrollY * scrollFactorY); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); // Undo the camera scroll particleMatrix.e = particle.x;