Calculate Path Distance
Hey,
I am new here! So I am trying to make a game where I draw a path using touch/mouse and an actor follows it. I want to know how I can calculate the distance the actor traveled along that path. If there is a direct way of doing that, great. Otherwise, I was thinking I can calculate the speed and time of the actor's motion and calculate the distance. The only trouble is, the speed doesn't remain constant (it follows the movements of the touch/mouse) and I can't seem to figure out to make it constant and how to get the time.
Any help would be greatly appreciated. Thanks!
Note: I am NOT trying to find the displacement.
I am new here! So I am trying to make a game where I draw a path using touch/mouse and an actor follows it. I want to know how I can calculate the distance the actor traveled along that path. If there is a direct way of doing that, great. Otherwise, I was thinking I can calculate the speed and time of the actor's motion and calculate the distance. The only trouble is, the speed doesn't remain constant (it follows the movements of the touch/mouse) and I can't seem to figure out to make it constant and how to get the time.
Any help would be greatly appreciated. Thanks!
Note: I am NOT trying to find the displacement.