Count kilometers
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
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.
I think it would be better to get their position each second and if it is more than a certain tolerance (0.1 meters example) when the next position update takes place then that distance would be added to the total.
Reply


Messages In This Thread
Count kilometers - by Despacito - 28.04.2017, 15:30
Re: Count kilometers - by NealPeteros - 28.04.2017, 16:18
Re: Count kilometers - by Despacito - 28.04.2017, 20:10
Re: Count kilometers - by Despacito - 29.04.2017, 21:47
Re: Count kilometers - by Sew_Sumi - 29.04.2017, 21:59
Re: Count kilometers - by Vince - 29.04.2017, 22:07
Re: Count kilometers - by Pottus - 29.04.2017, 23:03

Forum Jump:


Users browsing this thread: 1 Guest(s)