Emit 1 particle per second

Hey,

In my scene I have a particle system that should only emit particles when the hand is raised.
In the editor i’ve set the emission rate to 1 per second and play on awake turned off.

When I try to enable emission either through leftWeapon.enableEmission = true; or leftWeapon.Play(); nothing happens.

When I do leftWeapon.Emit(1); it spawns 1 particle every frame. So what I’m wondering is…How do I emit 1 particle each second either through getting leftWeapon.enableEmission = true; to work or only calling leftWeapon.Play(); once per second

thanks :slight_smile:

A particle system with one particle per second:

  • Select particle system in your Hierarchy
  • In Inspector: Set duration to 1
  • set Looping to true
  • In “Emission”: set Rate to 1

This should provide you with one particle per second.

To start the emission, go like this:

    private ParticleSystem m_Particles;

    void Start()
    {
        m_Particles = GetComponentInChildren<ParticleSystem>();
    }

    void Update()
    {
        if (Time.realtimeSinceStartup > 1 && Time.realtimeSinceStartup < 10)
        {
            if (!m_Particles.isPlaying)
            {
                m_Particles.Play();
            }
        }
        else
        {
            m_Particles.Stop();
        }
    }
1 Like