Thanks for all your insight and tips :)
What I have now a spring based system with a rest length of 20 (that's the links current size) and indeed there's a problem when the snake change direction drastically.
I will try to prevent it from acting like (making it only change direction in 90 degrees angles).
I'm still not sure i understand the difference between haphazardlynamed's method and a spring calculation.
I've adjusted the code in the link Pistachio supplied and I must say i'm not even sure if it's considered a spring simulation or simply calculating it the way haphazardlynamed suggested... :)
Here's the code i'm currently using:
for (i=1; i<MAX_LINKS; i++){ force_dir = Body[i-1] - Body; // length is a sqrt of the dot product CurrDistance = force_dir.length(); intensity = (CurrDistance-LINK_DISTANCE)/CurrDistance; ComputedForce = force_dir*intensity; Body+=ComputedForce;}
So basically, it seems things are working pretty well now, i'm justn ot sure what i'm doing right :)
Thanks again for taking the time to help!
ehud.