You're standing outdoors at the top of a skyscraper, perched on a narrow board, your toes an inch from the edge. You look down and — whoooaaaa! — you see ant-like cars on the street, many, many stories below. The city's tall buildings spread below in all directions. One wrong move could send you plummeting, so you reach for a flimsy-looking handrail to your right — but your hand just grasps at thin air ...

Oh, did we mention you're seeing all this through goggles and a headset, while standing in a therapist's comfortably carpeted first-floor office?

Virtual reality (VR) technology has the power to trick your perceptions, making you believe, at some level anyway, that you're in a different place. It uses computer-simulated interactive 3-D imagery — often accompanied by tactile or audible cues, sometimes even smell or taste — to give the user the feeling of being immersed in a different environment.

Deployed for decades to train pilots and astronauts, accessible as arcade games since the early 1990s, VR has been gaining interest recently as a therapy tool. The altitudinous scenario described above is used to treat fear of heights, and researchers have found VR effective for a wide range of psychiatric disorders.

Austin Jacobsen, a therapist at Ellie Mental Health in Mendota Heights, uses VR in systematic desensitization, the standard therapy for phobias and other anxiety disorders. It involves exposing the patient to increasingly intense forms of whatever it is they're afraid of, while the therapist guides them through relaxation techniques such as deep breathing and progressive muscle relaxation.

"You cannot be stressed and relaxed at the same time," Jacobsen explained. So gradually, the patient learns to respond calmly when encountering the stressful thing.

VR can enhance that therapy, providing an experience so realistic that patients feel like they're in the presence of what they fear. It can be used to treat a wide range of phobias in addition to heights: snakes, dentists, airplanes, small spaces, even public speaking (users find themselves standing before an audience).

Jacobsen has even used VR to treat a client with an outsized fear of vomit (scenes feature a puddle of vomit, a person hunched over a toilet).

A person in a VR environment knows, intellectually, that what they're seeing is simulated and they aren't really present in the situation. But that knowledge is held in their forebrain, the part involved in complex cognition, Jacobsen said. The hindbrain, the area that among other things controls the fight or flight response — the part that helped our ancestors react quickly to, say, the sudden appearance of a tiger without having to stop and think about what to do next — is fooled by the VR imagery.

One recent afternoon, Jacobsen demonstrated VR with a gracious volunteer, Megan Gooden, Ellie Mental Health's senior director of learning and culture. Gooden is not a therapy patient, but she has a serious fear of spiders, stemming from a visit to a zoo when she was younger, where someone put a huge spider on top of her head.

If Gooden sees a spider in her home, she said, she stands 20 feet away watching its every move — she can't just go to another room, because who knows where the spider might sneak away to — until her husband arrives to take care of it. A frequent public presenter, Gooden described a hypothetical situation where she might be speaking before an audience and would freak out if a spider crawled across the podium. That suggested the depth of her fear, considering that most people would be freaking out more from the public speaking.

"I'm ready, are you?" Jacobsen said.

"No," Gooden said.

Nevertheless, they began, sitting across from each other in Jacobsen's office. They went through some relaxation techniques: slow, deep breathing and progressively tightening and relaxing various muscles.

Then Gooden donned the VR goggles and headset. She found herself in a room (what Gooden could see also showed on Jacobsen's laptop.) She gazed around, and there it was on a table. A spider, held under a glass.

Jacobsen asked Gooden how distressed she felt. Very, she said, pressing her back against the back of the couch.

"My whole body is tense — I want to flip this table away from me," she said. "I don't want to be here right now."

More deep breathing, more muscle relaxing. After a few minutes, Gooden reported that her distress level had dropped a couple of notches — partly because of those calming techniques and partly because she could see that the simulated spider had remained safely contained under the simulated glass.

"It's absolutely amazing how easily our minds are tricked," she said afterward.

Gooden's arachnophobia had not been permanently cured, but she said she might be better equipped to deal with future spider encounters. Jacobsen's clients generally need at least five sessions before their fears start coming under control, he said.

He had another client with a fear of spiders, he said, After five sessions, "she could have hundreds of [VR] spiders crawling all over her — one on her hand, one dangling down in front of her," he said. "And she'd be super chill."

Fun as therapy

Carole Johnson, though not phobic, has tried the skyscraper one.

"I had to keep talking to myself so I could do it," said Johnson, a resident of the Pillars of Prospect Park, a senior housing community in Minneapolis. "I kept saying to myself, Carole, you're at the Pillars, you're at the Pillars. I had to force myself to take a step."

But on a recent morning, she and fellow resident Brenda Hoffman tried VR for a much less stressful activity: playing virtual tennis.

Well, mostly less stressful. "It's not going well because the ball is just rolling away from me," Hoffman said as she swatted at the air, holding a gadget that steered the motions of the tennis racquet she was seeing in the goggles (the same image could be viewed on a large screen on the wall).

This was a demonstration at the Pillars by FitVive, a Minneapolis physical and occupational therapy and wellness service for older adults. The service is in the process of developing its VR program, and has done several demonstrations at senior homes around the Twin Cities.

With a clientele seeking wellness rather than treatment for disorders, FitVive doesn't aim to scare people into better health.

"Fun comes first — function is sort of the byproduct of that fun," said occupational therapist Stanton Swanson, FitVive's founder and co-owner. "It's a work in progress."

The kind of VR therapy FitVive is developing could be useful for strengthening physical skills. For instance, the tennis — or the virtual boxing program FitVive demonstrated next — could help clients develop upper-body strength and range of motion. And it's easy to imagine how walking a virtual balance beam might help someone improve their balance, a crucial skill especially for older adults, for whom falls are the leading cause of injuries (including fatal ones).

VR can be used to help vision impairments like depth perception, said Dan Bodunov, a VR designer who is helping to create FitVive's program. Other programs are used in yoga or meditation. Some simply put users in a pleasant, scenic place; this kind is often used for memory care.

And, of course, having fun is good for you, too. "We want to offer an enjoyable experience, and we want people to be comfortable with the technology," Swanson said.

"It's masking wellness goals as entertainment," Bodunov added.

After the session, Johnson and Hoffman reported that they'd had fun doing it.

"Even if I didn't hit [the virtual tennis ball] I felt like I was doing something," Hoffman said.

"Tennis was good, too," Johnson said.

"But she was a cheerleader in high school," Hoffman said. "I'm not athletic."