[SOLVED] Lecture 58 unusual troubles

Hi all, I’m having a bit of trouble with particles, all of them work except the mainEngineParticles.Play(); function, it simply doesn’t happen… but once I hit the landing pad and move on to the next level then the thrust particles work… it’s rather frustrating and I’ll add the relevant code below

private void RespondToThrustInput()
{
if (Input.GetKey(KeyCode.Space)) // can thrust while rotating
{
ApplyThrust();
}
else
{
audioSource.Stop();
mainEngineParticles.Stop();
}
}
private void ApplyThrust()
{
rigidBody.AddRelativeForce(Vector3.up * mainThrust);
if (!audioSource.isPlaying) // Doesn’t layer
{
audioSource.PlayOneShot(mainEngine);
}
mainEngineParticles.Play();
}

Privacy & Terms