Lock camera position in VR
<p>I'm playing around with VR a bit, so far I can move a character around and such. However the position of the camera is changing. I want my camera to be in a fixed position and only be able to change up/down position and the normal rotation with the HMD. </p>

<pre><code>void Start ()
{
    startPos = transform.localPosition;
    parentObj = transform.root;
}

void Update()
{
    ResetVR();
}

void ResetVR()
{
    if (parentObj != null)
    {
        startPos -= InputTracking.GetLocalPosition(VRNode.CenterEye);       
        transform.localRotation = Quaternion.Inverse(parentObj.localRotation);
    }
}
</code></pre>

<p>With this my character rotates normally but the camera won't stay in a fixed position. </p>

<p>For example, if I rotate 90 degrees, the camera ends up left of the character. I want the camera stay in a fixed position.</p>