Hey guys,
I’m having a real hard time with this. I am drawing a line of waypoints by mouse input, and the character follows it, starting at mousedown. What I need to come up with is a way to set the speed based on either pixels per second (approximately), or percentage of screen width per second.
What makes it difficult is that since the character is following the waypoints as you draw them, there’s no way to calculate the total distance, and thereby find the speed. Also, since the waypoints are drawn per frame, they’re not an even distance apart.
Anyone have any ideas? I’m using transform.MoveTowards to set the speed, unless there’s a better way?