put the kilometer

Hello,
I am currently developing a car game but the problem is that it is not how to integrate the total distance traveled. (Miles)
Example on the crew next to the speedometer there is the total distance traveled with the car.
Thank you.

1 Unity unit is 1 Meter. Just increment the distance traveled and, if needed, convert it into miles from kilometers.

To make this easier, you could simply assume distance based on time and rate of travel. If your speedometer says the car is moving 100 miles per hour, you could simply assume it is correct and automatically increment the odometer as a function of time and speed. You could do that instead of manually tracking actual linear movement.

Rate * Time = Distance

1 Like