Exemplo n.º 1
0
    protected override void updateCameraProjection(AirVRClientConfig config, float[] projection)
    {
        var projectionMatrix = AirVRClientConfig.CalcCameraProjectionMatrix(projection, camera.nearClipPlane, camera.farClipPlane);

#if UNITY_2018_2_OR_NEWER
        var props = AirVRClientConfig.CalcPhysicalCameraProps(projection);

        camera.usePhysicalProperties = true;
        camera.focalLength           = props.focalLength;
        camera.sensorSize            = props.sensorSize;
        camera.lensShift             = props.lensShift;
        camera.aspect  = props.aspect;
        camera.gateFit = Camera.GateFitMode.None;
#else
        camera.projectionMatrix = projectionMatrix;
#endif
    }