The problem is that every emission call during the game results in particles shooting out on a specific axis, while the particles should just shoot out of the zombie's position in a radial manner. I've tried messing around with these functions listed on the documentation:
Code: Select all
pSystem:setEmissionArea()
pSystem:setDirection()
Code: Select all
particles = {}
function spawnParticle(x, y, speed, pSprite, pFX)
pFX.x = x
pFX.y = y
pFX.pSystem = love.graphics.newParticleSystem(pSprite, 20)
pFX.pSystem:setParticleLifetime(.5,1)
pFX.pSystem:setLinearAcceleration(-80,-80,80,80)
pFX.pSystem:setSpeed(speed/2, speed)
table.insert(particles, pFX)
return pFX
end
function particleUpdate(dt)
for i,p in ipairs(particles) do
p.pSystem:update(dt)
end
end