29.04.2017, 23:03
Quote:
Distance = Speed x Time. Decide if you want to store distance in meters or kilometers. Set repeating timer for 1 second. Get speed in km/h. Convert to km/s (3600 seconds in an hour, so divide speed by 3600) or m/s (convert kilometers to meters (multiply by 1000) and then divide by 3600). Add value to player stat.
|