Original Post
I am trying to create a snake-like creature. The idea here is that the snake can move around on the landscape, and look more or less natural (i.e. if you turn in a circle, its body forms a circle, if you move in a straight line, it forms a line, if you get mouse-frantic you could draw an S).
The problem is that I just can''t get the body segments to move along properly. I''m now trying to use a Lerp, where each body segment is lerped between its current position and the position of the body part one step closer to the head, and it seems to be ok, except when I do really tight turns (sometimes the body parts don''t move... I''m guessing because the distance between two segments is already within the lerp range).
Anyway, if someone has a better way of creating a snake, or of perhaps explaining the lerp thingy''s S parameter a bit better, it would be great.
Other methods I have tried:
Move This Segment to Higher Segment''s last position in the previous frame: - Causes gaps because the max movement distance can be greater than the size of a segment.
Move Current Segment Towards Higher Segment''s Current Position:- gets a bit hectic on the maths because you have to figure out the angles that each segment is facing and then move it in that direction. Plus it creates some unusual movement physics because rear segments can just bypass the chain and move directly forwards... and I''m not trying to make a sidewinder