using System.Collections; using System.Collections.Generic; using UnityEngine; public class Driver : MonoBehaviour { // Start is called before the first frame update [SerializeField] float steerspeed = 1f; [SerializeField] float moveSpeed = 0.01f; void Start() { } // Update is called once per frame void Update() { float steerAmount = Input.GetAxis("Horizontal") * steerspeed * Time.deltaTime; float moveamount = Input.GetAxis("Vertical") * moveSpeed * Time.deltaTime; transform.Rotate(0, 0, -steerAmount); transform.Translate(0, moveamount, 0); } }