my code doesnt work. its super annoying. whenever i hold down the left arrow key, it rotates once. the same as if i click it… why isnt it rotating once per frame for as long as im holding down the left arrow key? also just a side note it keeps rotating in intervals of 1 if I spam left arrow.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Rotate : MonoBehaviour {
public int angle;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown("left"))
{
transform.Rotate(Vector3.forward * 100 * Time.deltaTime);
}
}
}