Scientists have advanced our understanding of how ancient animals saw the world by combining the study of fossils and genetics.