- Home /
Question by
aled96 · Jul 23, 2014 at 09:04 AM ·
distanceendless runner
Endless runner distance
Hi i am making an endless runner 2d game.
In my game the character doesn't move, the backgruond instead moves and destroys when it touch an object (Destroyer).
How can i calculate the distance that tha player "runs" from the beginning to the end of the game ?
Thank you ;)
Comment
Best Answer
Answer by Kiwasi · Jul 23, 2014 at 11:11 AM
If your player is running at a constant speed then just use time.
Answer by SkaredCreations · Jul 23, 2014 at 09:18 AM
Since you are moving the background transform then you know how much it's moved, just increase a variable by the movement value. Isn't it?