Posts: 516
Threads: 153
Joined: Sep 2009
Reputation:
0
How calulate the drived km in game?
Posts: 1,028
Threads: 45
Joined: May 2009
Reputation:
0
Just use OnPlayerKeyStateChange when W is pressed it saves one position. When A, S, D is pressed or W is released it checks how far you drove. When A or D is pressed you need it to be called faster, due to the fact that you dont have a line that you can just calculate the length from. I hope this helps you a bit.
Cheers.