so i have this rotate script but instead of rotating while holding a key, it rotates 3 units to the left or right when i press a key:
void Update()
{
if (Input.GetKeyDown(KeyCode.A))
{
transform.Rotate(new Vector3(0f, 0f, 2f));
}
if (Input.GetKeyDown(KeyCode.D))
{
transform.Rotate(new Vector3(0f, 0f, -2f));
}
}