Ejemplo n.º 1
0
        void LateUpdate()
        {
            if (!VRSetup)
            {
                return;
            }

            DoUglyCameraHack();

            if (VRInput.GetActionDown(InputAction.Aim))
            {
                if (watch)
                {
                    watch.SwitchState();
                }

                //UIVisible = !UIVisible;


                //VRGlobal.ClearUIRenderTex();
                //PlayerGui.SetVisible(UIVisible);
                //PlayerGui.Inventory.SetVisible(UIVisible);
                // PlayerGui.m_playerStatus.SetVisible(UIVisible);
                //PlayerGui.m_compass.SetVisible(UIVisible);
            }
            UpdateOrigin();
        }
Ejemplo n.º 2
0
        public void Start()
        {
            if (VRInput.instance != null)
            {
                Debug.LogError("Trying to create duplicate VR_Input class! -- Don't!");
                return;
            }
            VRInput.instance = this;

            InitializeActionMapping();
            VRInput.Initialized = true;
            Debug.Log("Input initialized");
        }
Ejemplo n.º 3
0
        void Update()
        {
            if (overlayHandle != OpenVR.k_ulOverlayHandleInvalid)
            {
                var texture = new Texture_t();
                texture.handle      = UI_ref.m_UIRenderTarget.GetNativeTexturePtr();
                texture.eType       = SteamVR.instance.textureType;
                texture.eColorSpace = EColorSpace.Auto;
                OpenVR.Overlay.SetOverlayTexture(overlayHandle, ref texture);

                if (VRInput.GetActionDown(InputAction.Crouch))
                {
                    OrientateOverlay();
                }
            }
        }