my team and I are developing experiments for Neuropsychology, that make use of the Oculus Rift. In one of the experiments, the HMD is required to "stay still", meaning we have to disable tracking of movement, so that the image displayed stays the same, regardless of the users head movement. I know this is bad and not the intended behaviour, but it is how it is.
We achieved the "untracking" thanks to cybereality's reply to our original question. After that, the requirements tightened up even more for a different paradigm, where only change in the y axis is allowed. We achieved this behaviour, however, the code we use only works in the editor, but not in a standalone build in Unity (5.4.0 - 5.4.2), tested on Rift and DK2 with and without sensor.
cam.transform.localRotation = new Quaternion(0, cam.transform.localRotation.y, 0, cam.transform.localRotation.w); //cant set w to 0 as it will inverse the direction of camera
***omitted public setter for booleans blockRotatoin & blockPitchRoll ***
This script is attached to OVRCameraRig, the Script that calls the setter is attached to OVRPlayerController. Does anyone have an idea what the problem could be or we should start looking?