Treatment for mental illnesses could soon be transformed by virtual reality.
This cutting-edge technology is allowing doctors to treat psychological conditions, including phobias, depression, and even pain.
Some methods involve wearing bulky headsets - similar to the one tested out by Barack Obama at a technology fair in Germany last week - while newer techniques can transform entire rooms so that patients see, hear and feel like they are in another world.
Virtual reality therapy uses specially programmed computers to create an environment that mimics a real-life situation. This is relayed through projectors, either tiny ones that patients see through a headset, or huge projections on to the walls of a room.
The idea is that by gradually exposing patients to the thing causing their symptoms, they become desensitised to it.
For mental illnesses, they can then be guided through conventional talking therapies - such as cognitive behavioural therapy (CBT) - to develop coping strategies.
Exposing patients to perceived hazards is already part of treatment for a number of mental disorders such as phobias.
However, conventional techniques can overwhelm patients.
With virtual reality therapy, the therapist can control how much 'exposure' there is, and in some cases experience the virtual reality alongside the patient - thought to provide more effective treatment.
For example, if someone has a fear of pigeons, they could wear a headset showing a pigeon in the distance, and the therapist would talk them through their feelings.
More pigeons would be introduced in later sessions, until the patient can tolerate a flock. In comparison with conventional therapy, patients may be shown pictures and then eventually a real pigeon.
Virtual reality is thought to make exposure therapy faster. And because virtual reality is not real - and patients know this - there is no huge risk of them developing a full-blown panic attack.
Earlier this year, researchers at University College London tested the therapy in patients with depression. The aim was to train them to be less self-critical - thought to be a key issue in depression.
Patients wearing headsets were first confronted with a crying child they were told to comfort. They then switched roles to become the crying child, while the recording of themselves in the supportive role was replayed.
The idea was to teach patients how to show and receive compassion, so they could start to show it towards themselves. Nine of the 15 patients said their depression improved, the British Journal of Psychiatry Open reported.
Of course, this approach addresses only a single aspect of being depressed, but for some people where self-criticism is the biggest issue, virtual therapy might be all that's needed, says lead researcher Chris Brewin, a professor of clinical psychology at UCL. 'Self-criticism is a problem in many psychological problems, including eating disorders,' he adds.
A particularly promising area is pain distraction, says Paul Sharkey, a professor of cybernetics at the University of Reading.
Patients who would otherwise experience significant pain - such as when having wound dressings changed - could be immersed in a virtual reality so they were no longer aware of the pain, he says.
Virtual reality may also help to diagnose certain conditions. Last year, U.S. scientists carried out brain scans while patients in headsets tried to navigate their way out of a maze.
Those with a specific gene that put them at risk of Alzheimer's disease also showed reduced activity in a certain brain area, according to the journal Science.
This suggests the maze test could be used as another way to identify people at risk.
Meanwhile, Canadian researchers are developing a test that could diagnose glaucoma - where fluid builds up in the eye and can lead to blindness - in its early stages, more quickly than current tests.
The theory is that the feeling of movement people experience inside a virtual reality is governed by peripheral vision, which is affected by glaucoma.
Virtual reality is still far from being prescribed alongside conventional treatments such as CBT. The risks are unclear, and it may cause side effects such as motion sickness and headaches.
But the hope is that it could be used for a number of conditions. The technology is becoming cheaper, roughly the price of a smartphone, and you can already buy virtual reality headsets to use at home.
'Theoretically it will one day be possible for patients to download virtual reality sessions from the internet, just like a self-help book,' Professor Brewin says.