As I look down from space on our spinning blue and green planet, I understand why astronauts so often describe the experience of “Earth-gazing” as life-changing. I’m seeing our tiny planet highlighted against the infinite black expanse of the universe as I have never seen it before. It really does evoke a visceral sense of vastness and wonder.

It would be intimidating were I not able to anchor myself with familiar landmarks. That dry patch over there is the Sahara Desert. There’s the North Pole. And that’s North America! Below is the verdant Brazilian rainforest. Here comes Australia, with its vast expanse of parched Outback — and that long, lush green chain of islands must be Indonesia. I feel a profound sense of pride. Earth may be a tiny, insignificant speck in the universe, but this amazing speck is our home.

My reverie is broken by a somber female voice. “Climate change has begun.”

I’m not actually in outer space, of course. I’m standing in a bare Columbia University classroom on Manhattan’s West Side. I’m wearing virtual reality goggles tethered to a computer, headphones swallow up my ears, and I’m holding controllers that allow me to reach out and “touch” the world around me. It’s so immersive that a researcher trails behind me to make sure I don’t accidentally walk into a wall or out a window.

I’m in the middle of a virtual reality demonstration to experience the not-so-distant future of global warming and its impact on our oceans. It’s designed to make climate change feel as real and immediate as the news of a neighbor’s sudden passing.

Earth disappears, and a glowing blue orb — a crystal ball — materializes in front of me, hovering in the air. I touch the orb and I’m in broad daylight, standing in New York City traffic, cars all around me, horns blaring.

“Look at the gray car in front of you. Bend down and touch the exhaust pipe.” I step forward and touch the exhaust pipe, glowing fluorescent green, on a Toyota sedan. It’s as if I’ve poked a beehive. Circular red and blue molecules come buzzing out of the exhaust pipe. “These are CO2 molecules. Humans release over 22 million tons of CO2 into the atmosphere each day.”

The stream of molecules zip past me and float up into the sky. Now I’m on the bow of a boat, off the coast of Naples, Italy. I look up and see that the ominous swarm of CO2 molecules has become an angry colony of red and blue drones, hovering insidiously across the horizon.

One of the molecules separates itself from the others and increases in size. I watch as it floats down toward me and the ocean’s surface. Another molecule, this one H2O, floats up from the ocean to meet it. The two combine to form a larger compound. The voice tells me that the union forms carbonic acid. I’m sent underwater.

Schools of fish swim by a colorful coral reef. I’m instructed to pick up flags in a bucket at my feet and place them on every snail I find. I see them thriving in crevices of the reef’s tentacles. But in a flash, the snails and fish disappear and the reef turns brown with fuzzy algae. CO2 bubbles rise up from the ground all around me. “There are no living sea snails here,” the voice says. “They can’t survive.” Neither can oysters, clams, and plankton. The ecosystem has collapsed. The voice returns. “The future of our earth is in your hands,” it says.

The VR demonstration, called The Stanford Ocean Acidification Experience, is the brainchild of Jeremy Bailenson, a professor of communications at Stanford University and the founding director of the Virtual Human Interaction Lab. His project is the latest to demonstrate a new and potentially powerful new use for virtual reality — one that has little to do with entertainment. Bailenson wants to harness VR to address social problems and change human behavior.

Bailenson, who has a PhD in cognitive psychology, came to realize one of the main reasons we fail to act on social problems is that we tend to blame individuals for their problems, not any situation or social condition. In social psychology, blaming an individual is known as “the fundamental attribution error.” When bad things happen to them, it’s their fault. When bad things happen to us, it’s not ours. We lose sight of ourselves in the social fabric. In recent years, however, research has shown that granting somebody the perspective of another person can reduce the fundamental attribution error — seeing the world through another’s eyes can make us less quick to judge them.

Lee Ross, a professor of psychology at Stanford University who coined the term “fundamental attribution error,” is impressed by Bailenson’s attempts to change people’s minds with virtual reality. “What virtual reality does is lets you fully appreciate what a situation is like from the viewpoint of an actor,” Ross says. He says that VR could very well help people see there’s more to social problems than another person’s troubles, and even spur people to action. “I think virtual reality could have a very powerful effect,” Ross says.

To show how the fundamental attribution error might be overcome, Bailenson created a VR film that makes you homeless. You lose your job, get evicted, live in your car, get rousted by cops, and end up sleeping in a bus. Another of his VR experiences, designed with collaborators at Columbia University, allows you to walk in the shoes of an African American. You are singled out and yelled at by your first-grade teacher in a predominantly white classroom; confronted, as an adolescent, by police at gunpoint on your way to your basketball game and forced to kneel on the sidewalk in front of your house; and then, as a young Yale grad, get passed over for a job for a less qualified white applicant.

Results from the VR experiments suggest that people can change, Bailenson says. After being virtually homeless, he says, participants were more likely than a control group to support an increase in public spending for affordable housing.

In his focus on the environment, Bailenson has taken aim at what he calls the “knowledge-action gap.” People may be knowledgeable about a subject, he says, but that doesn’t necessarily translate to action. “It’s easy to get people to say they want to be green, but it’s really hard to get them to sort their trash or take UberPool instead of UberX,” Bailenson says. “When you try to get people to change daily behaviors, it’s ridiculously hard.”

One of his first efforts was inspired by a New York Times article that detailed how the rising popularity of soft, fluffy toilet paper in the United States was leading to the death of millions of trees, including old-growth forests in Canada. Though many professed concerns over climate change, only 2 percent of Americans used toilet paper made from recycled material, the article noted.

One of Bailenson’s graduate students constructed a beautiful virtual forest, with towering trees and chirping birds. Then she placed a virtual chainsaw in viewers’ hands and had them cut down a giant sequoia tree. After the tree smashed to the ground, they were instructed to walk around and examine the damage. The forest was quieted — the chirping birds had all been scared off by the noise.

After the subjects removed the goggles, they were told that using nonrecycled toilet paper would lead to the death of two such trees throughout their lifetime. Then, as the subjects walked by, the graduate student knocked over a glass of water, as if by accident, and asked them to help her clean up the spill. Those who had undergone the virtual simulation used 20 percent less napkins than those who had only read a description of trees being cut. A week later, subjects who had done the virtual simulation were also found to have been far more likely to have changed their recycling habits than those who had not.

For two decades, Adam Galinksy, a professor at Columbia Business School, has studied the effects of adopting another person’s point of view. His experiments have shown that “perspective-taking” can defuse racial biases and build harmony in fractious groups. He says virtual reality represents a significant step forward in fostering new vantage points. “People are very much anchored in their perspectives, and what virtual reality can do is unanchor them and allow them to experience a new way of thinking,” Galinsky says. “It really can move people in a new direction.”

After my virtual dive into the reef in the Naples bay, I head back out into New York City. Under the midafternoon sun, I look around at the trees and grass in the Columbia University quad. I watch the cars speed by and contemplate their exhaust pipes, now acutely aware of everything I can’t see. I vow to consider ways to reduce my carbon footprint and to support more ocean research. When I get home, I write a letter to my congressman and urge him to take action on climate change. It’s the first letter to a member of Congress that I have ever written.

Update: An earlier version of this piece misstated what compound is formed when carbon dioxide is dissolved in water. It is carbonic acid.