Body rotation with two handed Razer Hydra and Oculus Rift

Motion sickness is one of the most important issues to solve for virtual reality. I found that in my virtual environment setup, body rotation is the most important contributor to this sickness feeling. But I found out that deducing body rotation from the Razer Hydra controller positions mostly eliminates the feeling. In this post I will explain the why and how for this.You might know that my project goal is to relive the past in the most realistic way. Including Oculus Rift support was of course mandatory for this. I already had my arms waving around and hands grabbing onto things using the Razer Hydra. When I added the Oculus Rift to the set-up I made me quite seasick when moving around. For this reason I did not let anybody walk around in my virtual environment in the demonstrations I gave in the past weeks.

At first I thought it was in the suddenness of the movements: the analogue sticks quickly build up in value and therefore the acceleration of the virtual me is rather high. But decreasing this did not help a lot.

Then I moved to another approach: the experience should be as realistic as possible. Can we derive more information from the Hydra and Rift about the body and its movements and lower the need for more complex set-ups like the forthcoming STEM system? I occurred to me that the natural resting positions is such that the Hydra controllers always point forward. Could we use that fact to derive the rotation of the body itself? A quick implementation proved that this was the case, but it made me happier than I thought I would be, because with this, the nausea almost completely disappeared!

My theory for this is that the virtual body rotation is now almost directly connected the the real body rotation. When you move forward using the stick, you move into the direction you expect to move: forward. Also turning your virtual body around is now done by turning your real body around, so there is no mismatch any more.

The implementation

The basic implementation is rather simple: I take the Y rotation of both controllers and assign the average of those values to the virtual body Y rotation:

    void Start() {
        startOrientation = transform.eulerAngles.y;
    }

    void Update() {
        float orientation = controllerL.Rotation.eulerAngles.y;
        float orientation2 = controllerR.Rotation.eulerAngles.y;
        float delta = Mathf.DeltaAngle(orientation, orientation2);
        orientation = modulo(orientation + delta / 2, 360);

        orientation = modulo(startOrientation + orientation, 360);
        characterTransform.rotation = Quaternion.AngleAxis(orientation, Vector3.up);
    }

This script is then attached to the virtual me, which is the mesh representing me in the virtual world.

The practical side

When you start to use this implementation you will notice a number of serious (and possibly dangerous) issues. As you are turning around on the spot you get entangles or even strangled by the cords of the Rift and Hydra. As long as these devices are not wireless yet (the wireless STEM system is already announced for the summer of 2014), rotation should be limited to the -180 to 180 degrees range.

Besides that, you will drift away from the spot where you started to walk around. As you do not have any visual feedback to where you are in the physical world wearing the rift, this will be a serious issue. The solution is rather simple: but a hula hoop or a circular carpet with a small diameter (50-100 cm)  at the spot where you intend to play: when you reach the edge of the carper or the hula hoop your feet will notice that and you can correct your position. I actually use an improved version of the carpet: underneath the carpet I put a small disk in the middle: in this way you can continuously feel that you still are on the right spot. This works so well that I never reach the edge of the carpet any more.

CarpetLastly, there is the issue of finding the hydra base station and determining the real world orientation. For this I added a stick to the disc underneath the carpet pointing from the middle to the edge of the carpet in the direction of the Hydra base station. When needed I use this to reorientate myself in the real world again.

Tagged with: , ,

Leave a Reply