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.
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.
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();
if (!audioSource.isPlaying) // So it doesn't layer
{
audioSource.PlayOneShot(mainEngine);
}
if (!mainEngineParticle.isPlaying)
{
mainEngineParticle.Play();
}
}