This example scene is in the 2019 content. It’s called ConeTwistySnake, perhaps unsurprisingly. It is a scene you can make for yourself pretty simply, but included to run you through the important parts swiftly:
- Only the tail item is Kinematic in Bullet, the rest of the objects are all Rigid bodies. When making the scene, the tail was added first, then the constraint and then a segment. Afterwards I was careful to copy the constraint and then copy the segment to add them in order to make the scene easier to read.
- Doing it this way means you need to manually assign Attach Body 1 and Attach Body 2 . You might also need to turn the constraint on the heading if it is not facing along the snake (the snake in the example is running down the Z axis and the constraint had to be turned -90° on H). When setting the first constraint Swing and Twist Limits were enabled to give the characteristic motion of a segmented snake toy.
- The motion of the snake is directed by the keyframes on the tail. The rest of the motion is dynamic. Tipping the tail up and twisting it seemed to produce the most satisfying motion.