So I have a little spaceship game going where you press the arrow keys and move your ship around, and I want it to subtly rotate slightly when going left and right but then return to upright position afterwards, but with what I have when you hold down the arrow key like you have too to move, it causes it to continually rotate instead of just once and I can’t figure out how to limit it.
if (Input.GetKey(KeyCode.LeftArrow))
{
gameObject.transform.Translate(Vector3.left * 3f);
RotateLeft();
}