Reset Rift yaw when game starts
Hey Unity users,
I am building a demo of a (virtual) scene to experience while being sit on a chair with the Rift.
When my Unity software starts, the screen is all black so that no image is displayed during the time I am giving the Rift to the participant for the demo. He has time to put the Rift on his head and when he is ready, I am pressing a key and the virtual world fades in on the screen.
The problem with this is that when I start my software, it uses the Rift yaw value at that moment for the 'forward' direction of the camera. If then I pass the Rift the someone who puts it on but is not oriented as the Rift was when my software started, he will see the virtual world has he had already rotated...
I need to make sure that no matter what the current Rift yaw value is, when I press the key to start displaying my virtual world on the screen, it should be 'reset' so that the camera direction will be straight forward. This way I can press the key when the guy is looking straight in front of him and make sure he sees what I want him to see at startup.
Any idea how to do that ? I know in the Oculus demos, a key is used to reset the sensor data. In my case only the yaw is needed.
I tought InitializeInputs or SetCameras from OVRPlayerController would do that but it does not help...
Thanks !
I am building a demo of a (virtual) scene to experience while being sit on a chair with the Rift.
When my Unity software starts, the screen is all black so that no image is displayed during the time I am giving the Rift to the participant for the demo. He has time to put the Rift on his head and when he is ready, I am pressing a key and the virtual world fades in on the screen.
The problem with this is that when I start my software, it uses the Rift yaw value at that moment for the 'forward' direction of the camera. If then I pass the Rift the someone who puts it on but is not oriented as the Rift was when my software started, he will see the virtual world has he had already rotated...
I need to make sure that no matter what the current Rift yaw value is, when I press the key to start displaying my virtual world on the screen, it should be 'reset' so that the camera direction will be straight forward. This way I can press the key when the guy is looking straight in front of him and make sure he sees what I want him to see at startup.
Any idea how to do that ? I know in the Oculus demos, a key is used to reset the sensor data. In my case only the yaw is needed.
I tought InitializeInputs or SetCameras from OVRPlayerController would do that but it does not help...
Thanks !
