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.
Here are the few premises that this works with.
- The snake is made of induvidual parts, and it can change the angle the head it heading.
- Each segment moves at the same pace, all the time.
- The segments follow eachother, with the head leading.
- 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.