I’m having a lot of difficulties with the rotation of an object that is moving. The way I calculate the rotation is by taking the angle between point n and point n+1 like so

```
angle = math.atan2( (point[1] - pointprev[1]) , (point[0] - pointprev[0]))
```

I then add a keyframe of that angle into the fcurve. This gives the correct angle for the object. However the problem I’m having is that the interpolation of the fcurve causes my object to make a priouette around its axis when it moves from some quadrant to another (see screenshot). How can I fix this?