If I have a object that starts at 0 on the x axis, and moving it in the x+ axis. Is there a way I can track that distance made, and use it counter?
I have no clue what im doing, but was thinking something like
var distance = orgpos -> currentpos;
for each x10{
score += 1; }
And this action performed live while moving.
Edit:
calculatedDistance += (transform.position - previousPosition).magnitude;
previousPosition = transform.position;
I have this script that give me the distance, if thats to any help.
Found a way after I posted the question. Ill just post the way I did it for others to use.