Super Mega Worm movement?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By System_Error

Hi all.

Had an idea for an underground game, and thought “Hey, what if the player(s) could control a worm-like machine?”

And that’s why I’m asking this: How can one make a movement system like the one in Super Mega Worm, where only the head can be affected by gravity while it’s outside terrain, and be able to turn, while the rest of the body simply follows the head?