using UnityEngine;
using System.Collections;
public class Rotation : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
public float turnSpeed = 50f;
void Update()
{
if (Input.GetKey(KeyCode.A))
transform.Rotate(Vector3.up * turnSpeed * Time.deltaTime);
if (Input.GetKey(KeyCode.D))
transform.Rotate(Vector3.up * -turnSpeed * Time.deltaTime);
}
}
this is my code i need help on how to make an infinite rotation but it will change its rotation when a specific key is pressed going left or going right