Vehicle GUI
NWH Vehicle Physics 2 includes scripts needed to set up a vehicle dashboard or game GUI.
All scripts can be used inside a vehicle combined with World Space Canvas or in Screen Space for game GUI elements such as speedometers, gear indicators, etc.
Dash GUI Controlleris the main script and it acceptsAnalogGauges,DigitalGauges andDashLights.
Dash GUI Controller
Dash GUI Controller
DashGUIController is a script to help with setting up vehicle dashboards or game GUI.
- If
Data SourceisVehicle Changermake sure that you have oneVehicle Changerpresent in the scene.Vehicle Changeras a source should be used for game GUI whileVehicle Controllershould be used for in-vehicle dash GUI.
Analog Gauge
Analog Gauge
AnalogGauge is an universal analog gauge script that can be used for constructing vehicle dashboards or game UI.
It expects to have a Needle GameObject as a child object of the script.
Prefab of a pre-configured analog gauge is included with the asset.
LockAtStart and LockAtEnd can be used to peg the needle at the Start Angle or End Angle for easier configuration. Both options only work in play mode.
Digital Gauge
Digital Gauge
DigitalGauge is used to display textual/numerical values on the vehicle dashboard or game GUI.
It requires objects Text named Title and Readout as child objects.
Line Image object is required if Show Progress Bar option is used in which case the image will be scaled to imitate the progress bar.
Unit
If Unit field is populated the unit will be displayed inside the Readout, after the value.
Textual Type
When Textual is selected as Gauge Type the provided String value will be displayed in the Readout object with no further formatting.
Numerical Type
- A formatted value of
Numerical Valuefield will be shown.
- Format can be defined in the
Formatfield as it would be used in float.ToString() function. Default is0.00which will display the value with two decimal points.
Numerical Smoothingsmooths the value for easier readout.
Dash Light
Dash Light
A simple script that switches Color of an Image between On Color and Off Color, usually white and black.
- Color of the
Imagewhen the light is on. - Color of the
Imagewhen the light is off. Fade Time- time it takes for the light to turn off, onceHold Timeexpires. Imitates dash lights that use conventional bulbs.Hold Time- time it takes for the light to start turning off after the state has changed. Useful to remove flicker from signals that are not persistent but rather change on frame-to-frame basis, e.g. ABS and TCS.







