Hello all I am attempting to add some particle effects to my right and left boosters. I have walked through the same steps as the thruster. My code is below. Does anyone know why my booster animations are not showing up in game? I have also selected the correct prefab for each in my inspector. All my other particle effects work fine.
Thoughts appreciated.
private void RespondToRotateInput()
{
rigidBody.freezeRotation = true; //take manual control of ship
float rotationSpeed = rcsThrust * Time.deltaTime;
if (Input.GetKey(KeyCode.A))
{
rotateRight(rotationSpeed);
}
else { rightThrust.Stop(); }
if (Input.GetKey(KeyCode.D))
{
rotateLeft(rotationSpeed);
}
else
{
leftThrust.Stop();
}
rigidBody.freezeRotation = false; //resume physics control
}
private void rotateLeft(float rotationSpeed)
{
transform.Rotate(-Vector3.forward * rotationSpeed);
if (!rightThrust.isPlaying)
{
rightThrust.Play();
}
}
private void rotateRight(float rotationSpeed)
{
transform.Rotate(Vector3.forward * rotationSpeed);
if (!leftThrust.isPlaying)
{
leftThrust.Play();
}
}