Thrust Particle not working

Hi,

Thrust Particle does not play when thrust command is given instead it appears after death and if I keep pressing space bar.
I have added particle system as mentioned, to the instance and from there i draged to the hierarchy.
But still cannot figure out.
Explosion and success works but not Thrust particles.

Please help!

Hi Bhavesh,

Check if the thrust particle system from your Hierarchy is assigned to the Rocket. It must not be the particle system from your Assets folder.

1 Like

Hi Nina,

Thanks for the answer.
I have checked the particle system assigned is from the hierarchy. Additioinally as i mentioned that the thrust particle works after the collison or death, when i continue pressing space bar.

Hi Nina,

I found the solution. Just by adding following change in the code.
earlier:
private void ApplyThrust()
{
rigidBody.AddRelativeForce(Vector3.up * mainThrust *Time.deltaTime);

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

}

Now:
private void ApplyThrust()
{
rigidBody.AddRelativeForce(Vector3.up * mainThrust *Time.deltaTime);

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

And it works now.

2 Likes

Good job, and thanks for sharing your solution! :slight_smile:

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

Privacy & Terms