I want to draw a 2D closed curve using a given set of points (2D vectors?) that I can interpolate all the way around. But I do not know how to tackle this problem. It would be nice if someone could give me a code example but any hint or tip is welcome. I am in need of direction because I am totally clueless right now.
If there is only one object you need to move and you know the points ahead of time, you can also use the animation editor to define your path using keyframes. There is also a spline controller script on the wiki that might help. The example as given in the wiki has you create a GameObject with the path you want to take, but if you create the shape and make it a prefab, you can manually instantiate the path at different points, scale it, and then set it as the spline controller's path.
I solved this problem using quadratic bezier curves. I used the endpoint of one curve as the startpoint of another. Creating a closed curve proved to be easy this way.