I'm building a Cardboard app with Unity3D that should be able to Zoom in/out with the Magnetic Trigger. In the StereoController.cs changed the MatchMonoFOV=1 and MatchByZoom=1. Then i created a script with this method just for Zooming In:
public void TriggerStart()
{
//This counts the number of active cameras and set the FOV to 40
for (int i = 0; i < Camera.allCamerasCount; i++)
{
Camera.allCameras[i].fieldOfView = 40;
}
}
Unfortunately, this works only in UnityEditor but not with the Headset. Every kind of advice will be really appreciated!