Exemple #1
0
    protected override void setupCamerasOnBound(AirVRClientConfig config)
    {
#if UNITY_2018_2_OR_NEWER
        var props = config.physicalCameraProps;

        leftEyeCamera.usePhysicalProperties = true;
        leftEyeCamera.focalLength           = props.focalLength;
        leftEyeCamera.sensorSize            = props.sensorSize;
        leftEyeCamera.lensShift             = props.leftLensShift;
        leftEyeCamera.aspect  = props.aspect;
        leftEyeCamera.gateFit = Camera.GateFitMode.None;

        rightEyeCamera.usePhysicalProperties = true;
        rightEyeCamera.focalLength           = props.focalLength;
        rightEyeCamera.sensorSize            = props.sensorSize;
        rightEyeCamera.lensShift             = props.rightLensShift;
        rightEyeCamera.aspect  = props.aspect;
        rightEyeCamera.gateFit = Camera.GateFitMode.None;
#else
        leftEyeCamera.projectionMatrix  = config.GetLeftEyeCameraProjection(leftEyeCamera.nearClipPlane, leftEyeCamera.farClipPlane);
        rightEyeCamera.projectionMatrix = config.GetRightEyeCameraProjection(rightEyeCamera.nearClipPlane, rightEyeCamera.farClipPlane);
#endif
    }
Exemple #2
0
 protected override void setupCamerasOnBound(AirVRClientConfig config)
 {
     leftEyeCamera.projectionMatrix  = config.GetLeftEyeCameraProjection(leftEyeCamera.nearClipPlane, leftEyeCamera.farClipPlane);
     rightEyeCamera.projectionMatrix = config.GetRightEyeCameraProjection(rightEyeCamera.nearClipPlane, rightEyeCamera.farClipPlane);
 }