Skip to content

Speedometer_Controller Public Variables

Coder-Boiiiiiii edited this page Oct 23, 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.

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

Clone this wiki locally