Particle Effect STILL not working

My particle effects are not working. I tried every possible thing - watched videos, read documents, the questions mentioned here, and also the solution mentioned by @Luke_Comfortable.
This one
private void ApplyThrust()
{
rigidBody.AddRelativeForce(Vector3.up * mainThrust);

    if (!audioSource.isPlaying) // so it doesn't layer
    {
        audioSource.PlayOneShot(mainEngine);
    }

    if (!mainEngineParticles.isPlaying) // SO THE ENGINE PARTICLES DON"T LAYER EITHER
    {
        mainEngineParticles.Play();

    }

}

Then I played with parameters, of Jet particles, for a while but almost set all of them as they were. However, it started working. Still couldn’t figure out why.

But the other two particles are yet not working. Is there any problem with the Emission rate and duration provided in resources? Or any other issue? Please help.

1 Like

Hi,

Did you assign the particle systems from your Hierarchy to your rocket?

Yes, I did.

Remove the particle systems from your component in the Inspector and reassign them. Also add a Debug.Log to the second if-block. See your initial post. Then check your console while running your game. Maybe the code block never gets called.

1 Like

hello teacher, I also had a similar issue, you gave this code as a solution in another post and it worked perfectly. It really helped me out. here it is:

  private void ApplyThrust()
    {
        rigidBody.AddRelativeForce(Vector3.up * mainThrust);
        if (!audioSource.isPlaying)
        {
            audioSource.PlayOneShot(mainEngine);
            
        }

        if (!mainEngineParticles.isPlaying)
        {
              mainEngineParticles.Play();
        }     
    }
4 Likes

Thanks for letting me know that it fixed the issue for you! :slight_smile:

1 Like

[SOLVED]
It seems that there was some problem with by default “Duration” provided in the resources. As the duration of death particles was just 0.1 (or 0.2) secs. So I replaced jet particles with death ones and they were emitting but because of less ‘by default’ duration they were not emitting when hit.

So I simply increased the duration (and emission rate) a bit (0.5 secs and 700 particles) and it works perfectly now.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms