I am trying to create a chain of moving objects for a game (AS3). So far, I can drag objects behind another object, but all I can do is make a link move closer to another link based on distance. It doesn't work realistically and it still follows only one direction. If I try to pull the chain the opposite direction, it doesn't work.
I need a formula for pulling a chain behind whatever link is being pulled.
I also need a formula for making the links fall below the rest of the chain when it's at rest. The way I have it set up now, the links try to fall down, but they just fall straight down instead of being pulled below the rest of the chain.
There are a few chain and string tutorials out there, but none of them seem to incorporate gravity or pulling both ways.