Ejemplo n.º 1
0
    static void ConfigContinuumMain()
    {
        if (Camera.main)
        {
            Camera.main.transform.localEulerAngles = Vector3.up * 90;

            GeneralizedPerspectiveProjection projection = Camera.main.GetComponent <GeneralizedPerspectiveProjection>();
            if (projection == null)
            {
                projection = Camera.main.gameObject.AddComponent <GeneralizedPerspectiveProjection>();
            }

            projection.SetScreenUL(new Vector3(3.579f, 2.527f, 3.642f));
            projection.SetScreenLL(new Vector3(3.579f, 0.479f, 3.642f));
            projection.SetScreenLR(new Vector3(3.579f, 0.479f, -3.642f));
            projection.SetVirtualCamera(Camera.main);

            StereoscopicCamera stereoCamera = Camera.main.GetComponent <StereoscopicCamera>();
            if (stereoCamera != null)
            {
                DestroyImmediate(stereoCamera);
            }
            projection.SetHeadTracker(GameObject.Find("CAVE2-PlayerController/Head").transform);
        }

        c2sm = GameObject.Find("CAVE2ScreenMask");
        if (c2sm && c2sm.GetComponent <CAVE2ScreenMaskRenderer>())
        {
            c2sm.GetComponent <CAVE2ScreenMaskRenderer>().renderMode = CAVE2ScreenMaskRenderer.RenderMode.None;
        }

        Debug.Log("Configured for Continuum Main Wall");
    }
Ejemplo n.º 2
0
    static void ConfigContinuum3D()
    {
        if (Camera.main)
        {
            Camera.main.transform.localEulerAngles = Vector3.up * 0;

            GeneralizedPerspectiveProjection projection = Camera.main.GetComponent <GeneralizedPerspectiveProjection>();
            if (projection == null)
            {
                projection = Camera.main.gameObject.AddComponent <GeneralizedPerspectiveProjection>();
            }

            projection.SetScreenUL(new Vector3(-2.051f, 2.627f, 6.043f));
            projection.SetScreenLL(new Vector3(-2.051f, 0.309f, 6.043f));
            projection.SetScreenLR(new Vector3(2.051f, 0.309f, 6.043f));
            projection.SetVirtualCamera(Camera.main);

            StereoscopicCamera stereoCamera = Camera.main.GetComponent <StereoscopicCamera>();
            if (stereoCamera == null)
            {
                stereoCamera = Camera.main.gameObject.AddComponent <StereoscopicCamera>();
            }

            stereoCamera.EnableStereo(true);
            stereoCamera.SetStereoResolution(new Vector2(7680f, 4320f), false);
            stereoCamera.SetStereoInverted(true);

            projection.SetHeadTracker(GameObject.Find("CAVE2-PlayerController/Head").transform);
        }

        c2sm = GameObject.Find("CAVE2ScreenMask");
        if (c2sm && c2sm.GetComponent <CAVE2ScreenMaskRenderer>())
        {
            c2sm.GetComponent <CAVE2ScreenMaskRenderer>().renderMode = CAVE2ScreenMaskRenderer.RenderMode.None;
        }

        Debug.Log("Configured for Continuum Main Wall");
    }