Dick Tracey didn't have to visit a tall building to get over his fear of heights. He put on a virtual reality headset.

Through VR, he rode an elevator to a high-rise atrium that looked so real he fell to his knees.

"I needed to search with my hand for something solid around me," he said.

He told himself, "I must look stupid. Let's just stand up. Nothing's going to happen."

Virtual reality therapy can help people like Tracey by exposing them gradually to their greatest terrors. The technology is just now reaching the mainstream after 20 years of research. Equipment is lighter and more affordable, with tech advances spilling over from the gaming industry to help people fight disabling fears of flying, heights, spiders or dogs.

And the surge in products is bringing VR to more therapists' offices. Experts predict people with mild phobias will treat themselves successfully at home.

Research shows VR therapy can lead to real-world gains for people with phobias, and works as well as traditional exposure therapy, which slowly subjects patients to what causes anxiety for them.

For Denver librarian Nick Harrell, VR was a booster shot after traditional therapy for fear of flying. Panic drove him off a flight to Paris two years ago, forcing him to abandon a vacation with his girlfriend.

"I don't like being locked in the metal tube," Harrell explained. "I couldn't breathe. My chest was pounding."

With help from a therapist, Harrell first faced his fears through exposure therapy. Elevators, buses and trains were good practice for airplanes.

"Within a matter of months, I was flying again," Harrell said.

With VR recently added to his therapy, Harrell keeps fears in check. His health insurance covers the cost with a small copay.

But few people with phobias seek treatment. Too embarrassed to get help, many plan their lives around avoiding their fears.

Tracey of Oxfordshire, England, avoided heights, from ladders to breathtaking vistas. Escalators gave the 62-year-old retiree heart palpitations. His wife walked between him and steep slopes.

Tracey's VR therapy was part of a study. He was one of the first to try a VR world with an animated virtual coach. University of Oxford psychology professor Daniel Freeman developed the program for an Oxford spin-off with support from the National Health Service.

Freeman's team is now at work on a VR world where people with schizophrenia can practice being in a cafe, elevator or store.

"Many of our patients are withdrawn from the world," Freeman said. The fear-of-heights VR program shows you can automate treatment.

What is VR? Put on a headset and look around. You'll see a simulation of an interactive, three-dimensional environment. Look up and you'll see the sky; look down and your own hands and feet may come into view.

With exposure therapy, a therapist can accompany a person who's afraid of heights to a tall building. With VR, a patient learns to feel safe on a virtual high-rise balcony, without leaving the therapist's office.

Exposure works by gradually taking the oomph out of panic. Sweaty palms and pounding hearts ease. Fears shrink to manageable levels. By riding it out, a person learns the feelings are survivable.

The best studies on VR exposure therapy have been small with fewer than 100 patients. Increasingly VR therapy will be delivered at home via the internet, a still largely unstudied area, said Katharina Meyerbroker, a researcher at Utrecht University in the Netherlands, who has published reviews of research done in the field.

Harrell's therapist is helping field-test VR content for a company called Limbix, an arrangement between the company and the National Mental Health Innovation Center at University of Colorado's medical school.

Such ties are important for VR companies, which need scientific credibility to sell their products to therapists. Researchers gain too.

"We've all been piggybacking on this technology that was initially developed for video gaming," said Hunter Hoffman, a research scientist at the University of Washington in Seattle who developed an early VR therapy called Spider World two decades ago. He didn't license his arachnophobia project like other early researchers who've teamed up with companies to sell VR platforms and content.

Children may someday use VR to learn to cope with anxiety, said Stephen Whiteside, director of the Mayo Clinic Pediatric Anxiety Disorders Clinic, where a study targets kids with schoolwork anxieties.

In the VR scenario, a classroom teacher hands back a school paper with a bad grade.

"You hear the voices of other kids laughing and saying you didn't do so well," Whiteside said. "When I first watched it, I had a visceral response myself. It made you nervous."

The Mayo researchers say children prefer the VR experience to traditional exposure therapy. Next they'll test whether it works as well.

Whiteside said VR researchers everywhere must demonstrate benefits that outweigh treatment costs, which can reach $200 per session in some specialty clinics.

"The cheaper and more accessible it gets," Whiteside said, "the easier that will be."

VR therapy made life simpler for Tracey. After seven VR sessions, he now easily parks his car atop a multi-story garage. He stood on the flat roof of his house to clean his carport.

"I would never have dreamed of doing that before," he said. "I now know how much the fear of heights restricted my everyday life."