Rotation issue

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));
        }

    }

thx for the help from nobody, jk but i found out if i remove Down it works

Sorry I missed it. Intuitively the name of GetKey and GetKeyDown seem reversed. Happy you caught it though

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms