The purpose behind tree snakes’ rhythmic slithering as they glide through the air has been explained, offering up a new blueprint for dynamic flying robots.