car moving too slow?
pragma strict
ar WheelFL : WheelCollider; var WheelFR : WheelCollider; var WheelBL : WheelCollider; var WheelBR : WheelCollider; var maxTorque : float = 5000; function Start () { GetComponent.().centerOfMass.y = -0.9; }
function FixedUpdate () { WheelBR.motorTorque = maxTorque Input.GetAxis("Vertical"); WheelBL.motorTorque = maxTorque Input.GetAxis("Vertical"); WheelFL.steerAngle = 10 Input.GetAxis("Horizontal"); WheelFR.steerAngle = 10 Input.GetAxis("Horizontal"); } This is the script i have so far its purely just to make the car move but its going at a snails pace, i tried re-scaling the world but that only made things worse, although the car moved slightly faster, any help would be greatly appreciated. thank you
Answer by Cynikal · Nov 03, 2016 at 02:25 PM
Add something along the lines of:
float MyTorque = 0f;
float TorqueMultiplier = 5f;
Update()
{
MyTorque += Input.GetAxis("Vertical") * TorqueMultiplier;
}
And then on motorTorque use: myTorque.