If the world feels like a colder, meaner place these days, virtual reality may come to the rescue. Researchers across the globe are using immersive digital worlds to place users in someone else’s shoes and, at least temporarily, help them become kinder, more compassionate people.

Virtual reality is better known for its potential in gaming, but scientists, as well as filmmakers, writers, artists, and designers, are using VR to reduce racial bias, promote environmentalism, encourage empathy for prisoners, humanize political enemies, or even help users make better financial choices. It’s working, to some extent.

“We have spent the past fifteen years designing experiments to test the efficacy of VR to teach empathy. Across dozens of studies, a pattern emerges in that VR tends to be a more effective tool than other media and role-playing techniques,” Jeremy Bailenson, founding director of Stanford University’s Virtual Human Interaction Lab, says via email.

Related: 11 Surprising Predictions From the Top Names in Science

Though changes are often small, Bailenson adds, studies repeatedly show that virtual reality experiences can impact thoughts and behaviors in the real world.

A guest views Prabal Gurung's Samsung Gear 360 photographs on the Samsung Gear VR at Soho Beach House on November 30, 2016 in Miami Beach, Florida. Bryan Bedder / Getty Images

Sun Joo (Grace) Ahn has observed these behavioral changes first hand. In 2011, then a graduate student in Bailenson’s lab, Ahn sent study participants a questionnaire to determine how likely they were to understand the perspective of others. Two days later, the participants were provided with basic information about red-green colorblindness — a visual disorder that causes difficulty distinguishing between certain hues — and asked to verbally guide a person they believed to be colorblind through a series of virtual reality color-matching exercises.

Some participants viewed the exercises through a filter that simulated colorblindness, while others completed the exercises without the filter. Ahn found that after seeing the world through a colorblind lens, study subjects who originally weren’t as likely to understand the perspective of others showed more favorable attitudes towards colorblind people a full day after the exercise had ended. That attitude also translated into action. A separate experiment that asked study subjects to help a student group attempting to build colorblind-friendly websites showed that participants who experienced virtual colorblindness themselves, even for just a few minutes, spent about twice as long helping, compared to participants in the control group.

VR has been shown to drive behavioral changes across a wide array of scenarios. In Barcelona, light-skinned people who navigated a virtual world as a dark-skinned avatar showed lower subconscious racial bias than those who used an avatar with a closer skin tone to their own.

Get the mach newsletter. This site is protected by recaptcha

To study if taking the perspective of non-human creatures could motivate people to care more about environmental issues, Stanford University created a time-lapse simulation that allows users to assume the avatar of a piece of coral and watch as ocean acidification corrodes their digital limbs. Researchers observed that those who completed the VR experience perceived acidification to be a more imminent environmental problem than people who watched the same images on video without a VR headset.

Courtesy of Stanford University

But it doesn’t take a university-backed research team to create VR empathy initiatives. iAnimal — a project launched earlier this year by the advocacy group, Animal Equality — is a series of virtual reality films detailing life inside factory farms. The first installment shows viewers the lifecycle of a factory-farmed pig, from birth to slaughter, in part from the animal’s perspective. Since its release, the film has racked up more than 40,000 views and can be experienced in VR at home with Google Cardboard through the organization’s YouTube channel.

“We are sure that this is far more impactful than watching a video on a tablet,” says Jose Valle, Animal Equality co-founder and director of investigations. “Even if it’s difficult and some people cry when they watch it, they think it’s really important to show it to others.”

Related: How Computers Are Learning to Predict the Future

Virtual reality doesn’t just encourage empathy for external beings; it can also teach us to think differently about how we treat ourselves. A separate Stanford study placed research subjects in a virtual environment and had each of them interact with either an avatar that looked like them currently or an avatar designed to look like a future, elderly version of themselves. After exiting the VR environment, subjects who interacted with their elderly selves were significantly more willing to set aside money for retirement than those who interacted with avatars modeled after their current appearances.

iAnimal users. Courtesy of Animal Equality / Courtesy of Animal Equality

Ahn, lead author on the coral study and now director of the Games and Virtual Environments Lab at the University of Georgia, says that virtual reality makes an impact, in part because it fills in some of the perceptual blanks that prevent us from truly understanding another person’s condition or circumstance. “Perspective-taking” — the process of imagining life from another person’s point of view — often relies on a relatively small amount of information and a lot of imagination as the brain extrapolates all of the various ways that information affects another person’s life, often based on assumptions from our own lives.

With virtual reality, less extrapolation is required. Instead of imagining a world with distorted reds and greens, VR can ask users to search through a digital closet for the right color shirt, feeling all the emotions that go along with that action. Short VR experiences, when compared to traditional video of the same length, make more of an impact because, Ahn believes, VR’s extra sensory input helps imprint the experience more in the brain.

“Virtual simulations tend to mimic what you might experience in the physical world so there’s a lot more detail for you to create a mental schema, a memory of this experience as if it happened to you in the real world,” she says. “When you are trying to recall that experience later on, it’s a lot more salient. You have a lot more details to recall. It’s easier for you to build this mental map of what you experienced in your memory.”

Related: How the Tech Industry is Tackling the Cancer Moonshot

There’s a growing body of scientific literature, Ahn’s included, dedicated to uncovering how this salience can be used to encourage positive behaviors, but the best ways to get long-lasting effects aren’t yet set in stone, and Ahn says more research examining long-term repeated use of empathy-building VR programs is needed.

Even with data showing VR’s short-term impact, these projects still fight an uphill battle to change the psyche. Projects aimed at reducing racial bias, for example, may provide short exercises that challenge a user’s subconscious prejudices, but those projects compete against a daily deluge of information from the real world that reinforces racial bias through experiences like living in segregated neighborhoods and absorbing media that promotes stereotypes.

“Putting people in contact situations, particularly cooperative ones, is the most likely thing to reduce racial prejudice, though it’s no guarantee,” says Jim Blascovich, director of the Research Center for Virtual Environments and Behavior at the University of California, Santa Barbara. Virtual reality can be a tool to facilitate those meaningful experiences and potentially erode bias over time, but it can’t magically solve racism, or any other systemic problem, on its own, Blascovich says.

Related: This App is Revolutionizing Diagnoses of Rare Diseases

Empathy isn't a cure-all either according to Erika Weisz, a graduate student in Stanford University’s Social Neuroscience Laboratory who studies how different motivations drive people toward or away from using empathy. The ability to understand the feelings of others is “morally neutral,” Weisz says over e-mail, and “exquisitely context sensitive.” While empathy can motivate us to act kinder and become better people, it can also “be hijacked, or used to promote different agendas regardless of their moral composition.”

Both Weisz and Blascovich believe virtual reality can be a valuable tool in helping us better understand others, a significant step to becoming nicer people and enacting positive change. “It’s not a panacea,” Blascovich says, “but it’s probably as good or better than anything else we’ve ever tried.”

For more of the breakthroughs changing our lives, follow NBC MACH.