GetButtonUp() public method

public GetButtonUp ( ) : BaseController.eButtonId>.Dictionary
return BaseController.eButtonId>.Dictionary
Example #1
0
        /// <summary>
        ///
        /// </summary>
        protected virtual void Update()
        {
            if (canRecenter)
            {
                // PC : Push the keyboard for debug.
                if (Input.GetKeyDown(KeyCode.R))
                {
                    Recenter(true);
                }
                // Mobile VR : Hold the Home button for a while.
                if (ControllerInputManager.GetButtonUp(ControllerType.Controller, (uint)XimmerseButton.Home))
                {
                    m_LastHomeButtonPressedTime = -1.0f;
                }
                else if (m_LastHomeButtonPressedTime > 0.0f && (Time.time - m_LastHomeButtonPressedTime) >= 1.0f)
                {
                    m_LastHomeButtonPressedTime = -1.0f;
                    Recenter(true);
                }
                else if (ControllerInputManager.GetButtonDown(ControllerType.Controller, (uint)XimmerseButton.Home))
                {
                    m_LastHomeButtonPressedTime = Time.time;
                }
            }

            //setHMDRotation();
        }