How virtual reality really works