Obviously, Im a beginner Unity program and I’ve started a racing game using this tutorial (specifically this part of the tutorial):
So far, I’ve been able to apply wheel colliders, box colliders and basic. The script he supplies for car movement though, doesnt make my car move. What am I supposed to press to make the car move (arrow keys? WASD?) and is there anything wrong with the script itself.
Here is the script:
#pragma strict
var wheelFL : WheelCollider;
var wheelFR : WheelCollider;
var wheelRL : WheelCollider;
var wheelRR : WheelCollider;
var maxTorque : float = 50;
function Start () {
rigidbody.centerOfMass.y = -0.9;
}
function FixedUpdate () {
wheelRR.motorTorque = maxTorque * Input.GetAxis("Vertical");
wheelRL.motorTorque = maxTorque * Input.GetAxis("Vertical");
wheelFL.steerAngle = 10 * Input.GetAxis("Horizontal");
wheelFR.steerAngle = 10 * Input.GetAxis("Horizontal");
}
(Sorry about the fonts)
Also, looking at out tutorials, they suggest using gear ratios, max and min engine RPM. Should I include these as well?
Thanks
David