I'm making an underwater game and I think some cool ambience might include some giant tentacled creatures, like a squid or something. I'd like to make it so that its tentacles move in a wave shape the way they do in real life.
I tried this first by making segments joined by hierarchies but obviously that didn't work because hierarchies just make all the connected parts move at once and in the same direction. I also tried using the physics plugin to create joints between parts, but that also didn't work because the joint system in the physics plugin only lets you choose an object type to link to, not instances, which just made them all connect to each other (I think). The only remaining option seems to involve math, only I have no clue where to start with that kind of math.
It just occurred to me that the exact type of behavior I am looking for is the Worm AI for enemies in Terraria. Worm-type enemies are made up of segments with a head and a tail, and all the segments follow the head in a chain-like pattern. So if anybody knows how that system works and can explain how to replicate it, that would be awesome.