Tuning the car
From UnityCar Wiki
This class is used to add a set of menus for vehicle tuning. Add it to a GameObject and add your vehicle to Selected Car parameter in inspector to have tuning options for that vehicle. Tuning menus are logically divided in seven tabs.
Contents |
Engine
Engine Curves Based on a Polynomial Function
Engine torque and power are calculated using a polynomial function, which approximate adequately well engine curves.
In the graph, red curves represent engine Power. Higher red curve is the power without friction (Max Power), lower red curve is the power with friction (Max Net Power). Black curves represent engine Torque. Higher black curve is the torque without friction (Max Torque), lower black curve is the torque with friction (Max Net Torque). The blue curves is to be intended as a reference for engine torque. Ideally the the blue curve should be in the middle respect of the two torque curves.
- Power multiplier engine power is multiplied by this factor;
- Max Power max power of the engine (Net power is max power minus friction);
- Max Power rpm revs per minute where engine gives max power;
- Max Torque max engine torque;
- Max Torque rpm revs per minute where engine gives max torque;
- Engine Friction strength of the engine friction (bigger this value bigger power loss due to friction);
- Engine Inertia the bigger this value, the slower the engine revs up.
- Rev Limiter if enabled, engine rpm is limited to Max rpm;
- Engine Can Stall if enabled, engine can stall if the clutch is released too quickly (IMPORTANT: you must disable automatic transmission and automatic clutch (in assistance tab)in order to have a chance to stall the engine).
- Use Table Data if enabled, engine torque and power are calculated using a table look up made by a set of couple (rpm, torque) from an external file and interpolated by UnityCar. If disabled, engine torque and power are calculated using a polynomial function.
Engine Curves Based on Table Data
Engine torque and power are calculated using a table look up made by a set of couple (rpm, torque) from an external file and interpolated by UnityCar. You can set as many (rpm, torque) couple as you want.
In the graph, red curves represent engine Power. Higher red curve is the power without friction (Max Power), lower red curve is the power with friction (Max Net Power). Black curves represent engine Torque. Higher black curve is the torque without friction (Max Torque), lower black curve is the torque with friction (Max Net Torque). Power multiplier engine power is multiplied by this factor;
- Max Power (CALCULATED FROM TABLE DATA) max power of the engine (Net power is max power minus friction);
- Max Power rpm (CALCULATED FROM TABLE DATA) revs per minute where engine gives max power;
- Max Torque (CALCULATED FROM TABLE DATA) max engine torque;
- Max Torque rpm (CALCULATED FROM TABLE DATA) revs per minute where engine gives max torque;
- Engine Friction strength of the engine friction (bigger this value bigger power loss due to friction);
- Engine Inertia the bigger this value, the slower the engine revs up. Rev Limiter if enabled, engine rpm is limited to Max rpm;
- Engine Can Stall if enabled, engine can stall if the clutch is released too quickly (IMPORTANT: you must disable automatic transmission and automatic clutch (in assistance tab) in order to have a chance to stall the engine).
- Use Table Data if enabled, engine torque and power are calculated using a table look up made by a set of couple (rpm, torque) from an external file and interpolated by UnityCar. If disabled, engine torque and power are calculated using a polynomial function.
Transmission
- Differential Lock Coefficient Coefficient determining how much torque is Transferred between the wheels when they move at different speeds;
- Type Of Drive if RWD is selected, only rear wheels have power, if FWD only forward wheels, if AWD all wheels are powered;
- Final Drive Ratio final ratio of gears. Bigger this value, the shorter are the gears;
- Gear 1..n ratio specific ratio of the specific gear. Bigger this value, the shorter is the gear.
Suspensions
- Front / Rear Suspension Travel how long can travel the suspension;
- Front / Rear Suspension Stiffness how much stiff is the suspension;
- Front / Rear Bump Damping how much the suspension is damped when compressing;
- Fast Bump Factor factor multiplied with bump value when suspension is compressing at high speed (higher than 0.3 m/s);
- Front / Rear Rebound Damping how much the suspension is damped when expanding;
- Fast Rebound Factor factor multiplied with rebound value when suspension is expanding at high speed (higher than 0.3 m/s);
- Front / Rear AntiRollBar Stiffness how much stiff is the antiroll bar (its used to avoid lateral roll);
- Front / Rear Camber angle (in degrees) made by the wheels of a vehicle. Specifically, it is the angle between the vertical axis of the wheels used for steering and the vertical axis of the vehicle when viewed from the front. Camber angle alters the handling qualities. In particular, negative camber improves grip when cornering;
- Front / Rear Maximum Steering Angle maximum angle (in degree) that wheels can turn;
- Front Caster angular displacement from the vertical axis of the suspension of a steered wheel. Caster angle improves self-centering torque of the steering wheel.
Brakes
- Maximum Brake Torque maximum brake torque that brakes can use;
- Brake Balance how much brake torque is used in front brakes and rear brakes;
- Maximum HandBrake Torque maximum brake torque that handbrakes can use;
- HandBrake Balance how much handbrake torque is applied to front wheels and rear wheels;
Tires
- Forward Grip multiplier factor of forward grip (friction);
- Sideways Grip multiplier factor of sideways grip (friction);
- Front / Rear Tire Pressure front / rear tire pressure in kilopascal and atmosphere (if set to 0 tire pressure calculation is disabled);
- Tires Type changes tire parameters (responsible of tire behaviour). Competition is the tire with most grip and and most sporty behaviour (used on ferrari, mclaren and nissan). SuperSport has less grip but is more predictable (used on mini). Sport is like SuperSport with less grip. Touring is very predictable but with low grip. Offroad has better grip in offroad respect of the other tires. Truck is tire suitable for heavy vehicles.
Body
- Vehicle Weight vehicle weight in kg.
- Weight Repartition vehicle weight repartition between front and rear part of the vehicle;
- Fuel Consumption At Constant Speed engine fuel consumption (in liters/100km) at fuel Consumption Speed speed;
- Fuel Consumption Speed speed (in km/h) at which vehicle consumes fuel Consumption At Constant Speed value;
- Tank Capacity tank capacity (in liters). this affect the weight of the tank;
- Current Fuel current fuel contained in the tank. Its affected by current consumption;
- Drag Coefficient coefficient of the drag due to air friction. In real life it depends on the shape of vehicle body;
- Drag Area front vehicle area on square meters.
Assistance
- Arcade Mode if enabled, vehicle behaviour is modified in order to be more easily controllable. Parameters:
- Min Velocity minimum vehicle velocity (in km/h) to trigger Arcader intervention.
- Overall Strength general multiplier factor used to tune the strength of all helpers.
- COG Helper Strength multiplier factor used to tune the strength of COG Helper, that lowers COG (Center Of Mass) position in accordion with lateral slip, to avoid rollovers.
- Torque Helper Strength multiplier factor used to tune the strength of Torque Helper, that exerts a torque around the vertical axis, to counteract oversteer.
- Grip Helper Strength multiplier factor used to tune the strength of Grip Helper, that increases tires grip in accordion with lateral slip and speed, to counteract oversteer.
- ABS if enabled, it prevents wheels to be blocked when braking;
- TCS if enabled, it prevents wheels to be slip when accelerating;
- ESP if enabled, it prevents vehicle to spin when turning;
- Steer assistance if enabled, it limits maximum steering angle to ideal steer angle when turning;
- Automatic Transmission if enabled, changes gears automatically;
- Automatic Clutch if enabled, engages and disengages clutch automatically (IMPORTANT: you need to disable Automatic Transmission in order to disable Automatic Clutch);
- Automatic Reverse if enabled, when braking with the car stopped, automatically put reverse gear;
- Time to fully engage throttle time in seconds to floor the throttle;
- Time to fully release throttle time in seconds to fully release the throttle;
- Time to fully engage brakes time in seconds to floor the brakes;
- Time to fully release brakes time in seconds to fully release the brakes;
- Time to fully turn steering wheel time in seconds to fully steer starting from center;
- Time to fully release steering wheel time in seconds to fully release steer starting from full steer;
Save Setup
Saves all vehicle parameters in a setup file (only available if the vehicle includes the Setup class).







