I wrote everything the same, but my car flies off the screen and goes very fast. Can anyone help me see what I did wrong?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Driver : MonoBehaviour
{
[SerializeField] float steerSpeed = 1f;
[SerializeField] float moveSpeed = 0.01f;
void Start()
{
}
void Update()
{
float steerAmount = Input.GetAxis("Horizontal");
transform.Rotate(0, 0, steerAmount);
transform.Translate(0,moveSpeed,0);
}
}