how can I make sure to tell my object when I press the right arrow he must go infinitely right? and when I click the left must do the opposite? I have tried using if (Input.GetAxis) but right when I remove your finger from the button stops this is the script:
#pragma strict
function Start () {
}
function Update () {
if(Input.GetAxis("Vertical")>0){
transform.Translate(0,0,5.0*Time.deltaTime);
}
}