| 1 | {{{ #!Markdown |
| 2 | |
| 3 | # CarSettings |
| 4 | |
| 5 | Optional script that provides high-level properties for configuring the vehicle's features and driving aids. Controls specific properties at [CarControl](wiki:CarControl) for implementing these features. [CarInput](wiki:CarInput) and [CarTelemetry](wiki:CarTelemetry) read values here for displaying their data. |
| 6 | |
| 7 | This script is added to the root GameObject of the vehicle, besides to the [CarControl](wiki:CarControl) script. |
| 8 | |
| 9 | #### Properties of CarControl controled here: |
| 10 | |
| 11 | >autoMotorMax |
| 12 | autoBrakeMax |
| 13 | autoSteerLevel |
| 14 | motorBalance |
| 15 | motorForceFactor |
| 16 | antiRollLevel |
| 17 | |
| 18 | These properties of [CarControl](wiki:CarControl) cannot be modified when the CarSettings script is enabled (they revert to the values calculated here). You must use the parameters of CarSettings instead. |
| 19 | |
| 20 | ## Vehicle's available features |
| 21 | |
| 22 | __Description__: intended for the name or denomination of the vehicle. Used by [CarInput](wiki:CarInput) for displaying the vehicle's name at the dashboard. |
| 23 | |
| 24 | __hasABS__: the vehicle has anti-blocking brakes. Wheels don't lock when braking. |
| 25 | |
| 26 | __hasTC__: the vehicle has traction control. No burnouts or throttle-powered drifting are possible. |
| 27 | |
| 28 | __hasESP__: the vehicle limits its steering angle with speed. Avoids the front tires' sideways friction to surpass their maximum grip value, increasing stability. |
| 29 | |
| 30 | __hasTractionModes__: defines whether the drive wheels can be configured in-game: |
| 31 | |
| 32 | >0: fixed drive axle, no wheel drive can be changed. |
| 33 | 1: can switch among the main drive axle (_mainTractionAxle_, see below), and 4x4 full wheel drive only. |
| 34 | 2: can switch among front axle, rear axle, and 4x4 full wheel drive. |
| 35 | |
| 36 | __mainTractionAxle__: 0 front, 1 rear, 2 both (4x4). The drive axle can be changed or not according to the previous _hasTractionModes_ value. |
| 37 | |
| 38 | __hasVariableStabilizer__: defines whether the anti-roll bars' rigidness can be configured in-game. |
| 39 | |
| 40 | __mainStabilizerMode__: stabilizer mode to be used on startup and when the previous _hasVariableStabilizer_ value is false: |
| 41 | |
| 42 | >0: auto - chooses the mode according to the vehicle's speed |
| 43 | 1: offroad |
| 44 | 2: comfort |
| 45 | 3: sport |
| 46 | 4: stabilizer bars disabled - vehicle's stability based on individual wheel's suspension only |
| 47 | |
| 48 | The anti-roll bars or stabilizer bars make the vehicle more difficult to roll over in turns. _Offroad_ is the softest mode, good for low speeds and bumpy terrains. _Sport_ is the most rigid mode, good for high speeds and race tracks. |
| 49 | |
| 50 | ## Vehicle's in-game settings |
| 51 | |
| 52 | These settings are suitable to be changed in-game. They will have effect or not according to their availability defined before. In the [Live Demo][1] these properties are controlled with the keys 1-5. |
| 53 | |
| 54 | __abs__: enables the anti-blocking brakes. Wheels don't lock when braking. |
| 55 | |
| 56 | __tc__: enables the traction control. No burnouts or throttle-powered drifting are possible. |
| 57 | |
| 58 | __esp__: enables the limit of the steering angle with speed. Front wheels won't slide when steering at high speeds. |
| 59 | |
| 60 | __tractionAxle__: defines the drive axle: |
| 61 | |
| 62 | >0: front |
| 63 | >1: rear |
| 64 | >2: 4x4 full drive |
| 65 | |
| 66 | __stabilizerMode__: configures the rigidness mode for the anti-roll bars: |
| 67 | |
| 68 | >0: auto - chooses the mode according to the vehicle's speed |
| 69 | 1: offroad |
| 70 | 2: comfort |
| 71 | 3: sport |
| 72 | 4: stabilizer bars disabled - vehicle's stability based on individual wheel's suspension only |
| 73 | |
| 74 | The anti-roll bars or stabilizer bars make the vehicle more difficult to roll over in turns. _Offroad_ is the softest mode, good for low speeds and bumpy terrains. _Sport_ is the most rigid mode, good for high speeds and race tracks. |
| 75 | |
| 76 | ## Tunning parameters |
| 77 | |
| 78 | __stabilizerFactor__: multiplier for the anti-roll bars' rigidness. Allows to fine-tune the vehicle's stabilization without having to reconfigure the properties at the AntiRollBar scripts. 1.0 is the original value, 2.0 doubles the rigidness, 0.0 disables the anti-roll bars. |
| 79 | |
| 80 | __espLevel__: influence of the ESP feature (limits the steering angle with speed) on the steering angle limit. |
| 81 | |
| 82 | - 1.0 is the original value. Avoids the front wheels to surpass their maximum sideways grip. |
| 83 | - <1.0 reduces the influence. The less value, the more the front wheels are allowed to surpass their point of maximum sideways grip. 0.0 is the same as disabling the ESP. |
| 84 | - \>1.0 multiplies the influence. The more value, the less steering angle is allowed when increasing the speed. |
| 85 | |
| 86 | ## Other |
| 87 | |
| 88 | __bypassTC__: allows the "bypass the traction control (TC)" feature without having to deal with the _esp_ property. |
| 89 | |
| 90 | __serviceMode__: disables the script. Used from _CarTest_ for retrieving the vehicle's raw data. |
| 91 | |
| 92 | |
| 93 | [1]: http://www.edy.es/unity/offroader.html |
| 94 | }}} |