Hello!
I'm looking for some specific behavior for a snake. I'm going to describe it
the best I can. Alternatively, you can look here for similar movement.
http://www.miniclip.com/games/snake/en/Here are the few premises that this works with.
1. The snake is made of induvidual parts, and it can change the angle the head it heading.
2. Each segment moves at the same pace, all the time.
3. The segments follow eachother, with the head leading.
4. Each segment has a set distance to the ones in front of it, and the one behind it. This distance must be maintained.
I have tried to emulate this behavior. I have tried to have each segment find the
segment in front of it, and point/move towards it. This way, however, they don't maintain the same distance
all the time. If I then explicitly make them wait if the distance is too great, a long snake will only move
it's segments in the front while turning. This is a problem. Avoiding obstacles will be difficult.
Any inputs as to how this can be achieved.