Plane controller rotation (C#)

Hey all this is my first time on the forums so dont be too harsh on me.

I’m making a simple plane combat “Metal Storm-esque” game. Im having some trouble getting the player to rotate 10 degrees when i press the right arrow key and rotate -10 degrees when i press the left one and then normalising when i release. This is what i have so far

public class PlayerMovement : MonoBehaviour {
	public float playerSpeed = 3f;
	
	// Update is called once per frame
	void Update () {
		Vector3 input = new Vector3 (Input.GetAxis("Horizontal"),Input.GetAxis("Vertical"),1);
		transform.Translate(input * playerSpeed * Time.deltaTime);
	}
}

I would also appreciate if you had any other ways to optimise my code,

Tiatang

you’re not doing any rotation…

you can set the rotation directly using:

transform.rotation = Quaternion.Euler(10,0,0);

or you can use some of the rotation functions if you want a smooth rotation. I would suggest RotateTowards