title: PaperJS - How to move along path and rotate along the path
body: <p>The examples shown in <a href="https://stackoverflow.com/questions/12295072/paper-js-animation-along-a-path">here</a> show how to move an object along the path in Paperjs but how do I rotate them correctly along the path?</p>
  
  <p>In the examples shown on the link above, people suggested by using a circle as an example. But once changed to a rectangle <code>new Path.Rectangle(new Point(20,20), new Size(20,20));</code> you can see that it moves along the path but does not actually rotate in the direction of the path.</p>
  
  <p>How do I calculate the rotation and set it to my object?</p>