I am trying to figure out how I can smoothly interpolate between any 2D primitive at runtime, this is made harder by the fact that shapes can have different amounts of vertices, for example; I may want to smoothly switch between a Triangle and a Square, or Octagon.
My question is, what is the best way about doing this? my initial thoughts were to program this by defining the shapes in code and performing some morphing algorithm, but this would not account for the change in vertex count. My other idea was to use the Animator to somehow switch out the gameobject and blend the transition, but this seems an awful lot of work and makes for a very rigid system. It would also take a lot of time to implement new shapes.
Any thoughts and ideas are welcome. As are code snippets!
Thanks for your time.