How to move a point along a line?

11-16-2018 10:44 AM
New Contributor II

I have a polyline showing a delivery route. How can I move/animate a point along the line from start to the end?

0 Kudos
1 Reply
New Contributor III

I think your best bet is some math and the update(x, y) method from Point. 

You have the two points that make the line, from the Polyline Object. You know that

y=mx+b, and m = (y2-y1)/(x2-x1)

so you can find the equation for the line. Then you can produce x values, and find the associated y values, and then use the update method to set the point. 

Low level graphics manipulation is a bit involved. Good luck man