// Adapted from https://forum.unity.com/threads/car-style-turn-movement.156359/ using UnityEngine; using System.Collections; using System.Collections.Generic; public class VehicleMovement : MonoBehaviour { public float TurnSpeed = 2f; public float MoveSpeed = 10f; private float leftRight = 0f; private float forward = 0f; // Use this for initialization void Awake() { } void ProcessInput() { leftRight = Input.GetAxis("Horizontal"); forward = Input.GetAxis("Vertical"); } // Update is called once per frame void Update() { ProcessInput(); transform.RotateAroundLocal (Vector3.up, leftRight * TurnSpeed * Time.deltaTime); transform.Translate(0, 0, forward * MoveSpeed * Time.deltaTime); } }