Changed spawnParticle method