Search Unity

WheelCollider just work when we press Input.GetAxis("Vertical") Button

Discussion in 'Scripting' started by edward454, Jan 11, 2016.

  1. edward454

    edward454

    Joined:
    Jun 19, 2015
    Posts:
    2
    i have these lines of code in my script,
    wheelBL.motorTorque = maxTorque *0.5f*3;
    wheelBR.motorTorque = maxTorque *0.5f*3;

    but when i hit play button, my gameObject won't go forward, but it can go forward when i hit "W" or "UP arrow" button. please help me to solve this
     
  2. Browdaddy96

    Browdaddy96

    Joined:
    Aug 27, 2015
    Posts:
    82
    Can you post the entire script, but if you use Input.GetAxis("Axis Name Here"); it will use the other axis