Reducing VR Sickness In First Person Navigation

Apurva Shah
4 min readDec 17, 2015

--

Problem Statement

At Whamix we are working on a character centric VR experience called “We Walk on Bones.” The viewer is a ghost befriended by young Emily as they explore the backyard of a boarded up diner and collaborate on building a sculpture from found objects. We are working with Unity3D on Windows with Xbox One controller and targeting the Oculus Rift headset. It’s exciting to be engaged in character animation, game play and visual design all together — and of course hunting down some tricky technical problems along the way.

One of the first issues we ran into as we started on the project was the nausea inducing effect of navigating with the default Unity and Oculus (OVR) first person controllers. Unity’s controller, built on top of the simplified RBD character controller, is inherited from consoles so the player uses the left joystick for locomotion direction and right joystick for body orientation. The fact that you have a HMD driving head direction is purely incidental. Navigating with any sense of cohesion is almost impossible since head, body and locomotion direction are all distinct and driven by different inputs.

In recognizing this problem, Oculus offers a first person navigation controller, called OVRPlayerController, as a part of its Unity utilities. This controller by default orients locomotion in the direction of the head rather than the body. While the body can still be tweaked with the right joystick, by default the player will arrive at their target with the body facing in a different direction which is immediately apparent when they return their head gaze forward. Unfortunately, this is different than how our locomotion physiology works. Research has shown that our head anticipates and steers our locomotion trajectory. Animators are well aware of this and let their character’s head lead the body. Physiologically we are better at making quick changes in eye direction, followed by the head and less so when it comes to reorienting our entire body. The Unity and Oculus player controllers unfortunately require distinct body re-orientation that is not naturally tied to head and locomotion trajectory thus increasing the sense of VR sickness.

From: The predictive brain: anticipatory control of head direction for the steering of locomotion.

Some Heady Trig

The WhamixPlayerController is essentially the same as the OVRPlayerController when it comes to processing inputs, updating trackers and driving the character controller. The only difference is a new function called HeadAlign that progressively re-orients the body based on the head and locomotion direction. Reviewing the underlying math is the fastest way to figure out what is going on.

First off we use quaternions to calculate the angle between the head-body, HR.BR and head-locomotion HR.LookRotation(LX, LY). For simplicity we will only focus on Y axis rotation so all other components can be ignored. The progressive change in body orientation to align with the head is based on the following factors:

  • We get the maximum change when head-locomotion angle is at 90 degrees and it rolls off to no effect at 0 and 180 degrees. Intuitively we get a bigger re-orientation in the body when we look further away from our trajectory of motion.
  • The amount of orientation correction is capped by the head-body angle since body orientation shouldn’t overshoot.
  • Only use the forward component of motion. If the player is strafing or moving backwards the body retains its original orientation.

The amount of re-orientation per iteration is modulated by delta time and accelerated in the same way that OVRPlayerController deals with locomotion.

Show Me the Code

We are releasing the WhamixPlayerController.cs script for Unity under GPL license. Please note that Oculus’s terms and conditions form the OVRPlayerController.cs are retained in the header and still apply.

To install simply add to OVRPlayerController object as a component script then turn off the default OVRPlayerController script.

There are two primary controls that are available in the component editor:

  • AlignMaxRot determines how much the body is allowed to re-orient at each step. Higher values trade off a tighter turning radius for a more floaty sensation.
  • HeadAlign can be used to toggle off the effect all together.

We have a perfunctory movie capture of WhamixPlayerController in action. Unfortunately it doesn’t really meany anything unless you experience it with the HMD and game controller. So we encourage readers to download the open source script and quickly plug it into their projects or demo scenes to experience first hand what we have been discussing.

WhamixPlayerController in action for first person navigation in our temp set

Conclusion

There are many factors responsible for VR sickness. We have tried to address one of these related to first person player navigation by observing that physiologically the head leads our locomotion trajectory. We have provide an open source script, WhamixPlayerController, that you are welcome to integrate in your projects within the provisions of Oculus’s licensing agreement. Of course, if this script doesn’t help, there is always Virmo :)

As we continue with Bones, particularly looking at aspects of character acting in response to player presence, we hope to discuss further learnings and challenges that we discover.

References

--

--

Apurva Shah

Maker and life long learner interested in customer experience innovation