currentGear++; nextShiftTime = Time.time + autoShiftDelay;
[Header("Gearbox")] public float[] gearRatios = 3.5f, 2.1f, 1.4f, 1.0f, 0.8f, 0.6f ; public float finalDriveRatio = 3.5f; public int currentGear = 0; public float upshiftRPM = 6500f; public float downshiftRPM = 2000f; public float autoShiftDelay = 0.2f; private float shiftTimer = 0f; realistic car driving script
Torque Curve: Define how much power the engine has at specific RPMs. currentGear++; nextShiftTime = Time