The role of body mechanics in touch sensation in the nematode Caenorhabditis elegans