cancel
Showing results for 
Search instead for 
Did you mean: 

Oculus facing towards Sky/ Up direction

pgpreeth123
Honored Guest
Hi Team Oculus,

We are working on a medical application where we use Oculus in the system. It is a game where the 3d character moves forward (Something like the roller coaster Demo). Since the patient will be wearing the oculus lying down and facing the sky we have some issue with the camera in Unity. Currently when we wear the oculus in a sitting/standing position the game works perfectly and the camera behaves exactly the way it has to be. But if we wear the Oculus in a lying position facing the sky and we start the game, the camera in the game faces the sky like the oculus. Is there a way to calibrate the oculus to the original/initial camera position i.e the forward direction and make the game work like the way it worked in sitting/standing position?

We have tried adding a parent game object to the camera and independently rotate it. But it didn't work exactly the way it has to work. Certain angle works.

We even tried to update the tracking space but didn't give the desired result.

Initially when we were working with DK 1 (with older plugin and runtime software) a year ago the camera used to work in lying position and we used to play the game. Currently in DK 2 and with the latest driver and plugin this is not the case. Is there a good solution to this problem?

Please see the attached image for visual reference
http://i60.tinypic.com/2a4tp4x.jpg

Thanks in advance,

Preeth

Lead Technical Artist, Exigent3D
http://www.exigent3d.com
1 REPLY 1

IDZoulias
Honored Guest
If you are using Unity 5 and the integrated VR support then just use this line:
UnityEngine.VR.InputTracking.Recenter();


whenever you need to recentre the screen (i.e. in the beginning of the game if the Oculis is facing upwards).

Best to place it around a key to be able to recentre the view every time you need to:

        if (Input.GetKey(KeyCode.R))
{
UnityEngine.VR.InputTracking.Recenter();
}


That should do the trick