Paul_6
1
I have a bike and i want to make it move forward with and augmenting velocity
My script is this:
var velocity = 0.0;
function Update ()
{
if(Input.GetButton("W"))
{
velocitat = velocity + 0.1;
transform.position.forward * velocity;
}
}
The console don't tell me any errors so I don't know what to do.
Can someone help me please?
Not at my Unity machine atm but...
What is the 'velocitat" variable used for. Mebe it should be this:
var velocity = 0.0;
function Update ()
{
if(Input.GetButton("W"))
{
velocitat = velocity + 0.1;
transform.position.forward * velocitat ;
}
}