Skip to content

Speedometer_Controller Public Variables

Coder-Boiiiiiii edited this page Oct 24, 2021 · 2 revisions

General Settings

Car - Attach the car's rigid body to this variable.

Maximum_Speed - Set this to the maximum speed of the car.

Minimum_Speed_Arrow_Angle - Set this to the rotation of the needle when its speed is 0 (or its minimum speed)

Maximum_Speed_Arrow_Angle - Set this to the rotation of the needle when it is at its maximum speed.

Speed_In_KPH - If this is set to true, then the speed will be displayed in KPH (km/h).

Gears Setting

Gear_Speeds - These will be the speeds for each gear.

UI Settings

Speed_Text - Set this to the Text that will display the speed.

Arrow - Set this to the object that represents the arrow/needle (this will be the one rotating).

Gear_Text - Set this to the Text object that displays the gear the car is at.

Audio Settings

Use_Audio_Settings - check this if you want to use the audio settings.

Gear_Shift_Up - Attach the audiosource that will play the gear upshift sound.

Gear_Shift_Down - Attach the audiosource that will play the gear downshift sound.

Script References

car_controller_script - Attact the car controller script to this.

Debug

These are all read-only values.

Reference(s)

I used this tutorial for the foundation of the script, I just built upon it but I am crediting this guy anyway

https://www.youtube.com/watch?v=CC8j_fU2GTQ