New-ish to Unity here, apologies if the question is asking too much. I have a simple script that works very well in non-VR mode, but as soon as I tick the VR enabled box it puts the camera in the right start position, but no longer follows my character. If I recall correctly, it worked when using the OVR camera in Unity 4.
Here is the code. It’s about as simple as codes get. Not sure why it says it’s in CSharp. It isn’t.
var target : Transform;
var distance = 10;
var lift = 1.5;
function Update () {
transform.position = target.position + Vector3 (0, lift, distance);
}
Create an empty game object and make the Camera a child of the empty object. Then change the transform of the Parent object (empty object). VR Camera transforms cannot be changed in the current integration of Unity. But the transform is effected by the parent object’s transform.