Think I know how this could be done
OK, first, imagine the head and origin point are the only objects to start
H O
H(ead) moves about while the O(rigin) stays still, give whatever movement path or system you want to the head.
Now, lets add a chain link.
H C O
Now, this chain link constantly attempts to get to the point between H and C, note i say 'tries to get to', not 'is positioned at'. You would have it's target destination always be the constantly updated middle point, andthe speedof it's movement should also be proportional to the distance from that point.
So, say, you could always have it move 10% closer to it's every frame sorta like
*Always
-set position x to (Xpos+((TargetX-Xpos)*0.9))
then repeat for Y
where target X would be (OriginX+((HeadX-OriginX)*0.5)) <- 0.5 denotes half the distance between the head and origin
in full it'd look like
-set position x to (Xpos+(((OriginX+((HeadX-OriginX)*0.5))-Xpos)*0.9))
with this, when the head moves about, this 1 chain piece will keep trying to move towards the center, if the head moves fast, the distance is large, the chain moves faster etc. But it always appears to lag behind.
Now, you repeat this with several more chain pieces, which are instead of trying to move to the mid point (0.5, as mentioned above) try to reach different distances, you simply change teh 0.5 in the line abovetowhatever distance you want, 1 being the head, 0 being the origin.
Now, this would give you basically a basic bezier curve, this is the basic effect you're looking for.
This is totally off the top of my head of course, but it seems to me like it should work, ill see if i can get an example workin.
Thank you. But would greatly appreciate an example (.mmf) because I do not speak or understand English very well, so it would be really grateful if you upload an example.
Very Thanks, and sorry for discomfort.
(sorry for my english too)
__________________________________
www.mmfzone.com (para miembros que hablen espaņol)*(for spanish members)
The code is a quick hack together and supports a single chain monster with 9 pieces + origin per frame.
To make it work with multiple chains you would need to add more looping(A recurring loop that loops through each chain and then each piece in that particular chain) and some dynamic speed and position additions to the inertia calculations. And it's a little late for me to get my head around that properly at the moment
Sorry if it's a bit wordy for you :< hope you understand the code.
Although, If you only intend to have one in the frame, you should be able to simply copy paste it into your frame for it to work. Could work as an interesting boss
Originally Posted by OldManClayton That's really cool, but if the head doesn't move fast enough the chain looks perfectly straight.
If you were to add a further multiple to teh speed (I have each pieces speed to be multiplied by it's position in the chain) if say, you doubled it all, it would further exponentialise (If that aint a word, I call copyright on it) the movement.
also, the event that slows down the inertia (it like, sets inertia to the inertia*0.8 in that example), if you change that value, the movement of the chain pieces becomes more 'bouncy', 0.9 would be a lot more bouncy for example, but i tried putting in a speed that reflected the example gif