#pragma strict
var speed : float = 50;
var turnSpeed : float = 2;
function Update ()
{
//this is the forward speed that will actually happen
var steer=Input.GetAxis(“Horizontal”);
var gas=Input.GetAxis(“Vertical”);
if (gas!=0)
var moveDist=gasspeedTime.deltaTime;
//turn amount
var turnAmount = Input.GetAxis(“Horizontal”)*turnSpeed;
//rotate the vehicle
transform.Rotate(0,turnAmount,0);
}
The above is the script i used to make the car move but the car only rotates around its axis (y-axis) it does not move forward.
how can i solve this?