I am making a procedural animation of a worm. I have already something working:
(the green dot is the position Target, purple and red are the Head and the Tail of the Worm)
I would like to add another dot in the center of the Worm to simulate the middle body waving up and down while Head and Tail are moving like this:
I thought that it was going to be easy using some kind of 2D joint, but I tried several and I was not able to find a good result.
I was also thinking that maybe I have to make some trigonometry to calculate the possible positions of Center:
Before I over-engineer the solution what would be your approach to solve this?