Esempio n. 1
0
    protected void _RefreshRayMesh()
    {
        VRSelection selection = m_SelectionMgr.GetSelection();

        if (selection != null)
        {
            m_Wand.SetRayColor(HoverColor);
            m_Wand.SetRayLength(selection.SelectionDistance);
        }
        else
        {
            m_Wand.SetRayColor(m_Wand.DefaultRayColor);
            m_Wand.SetRayLength(m_Wand.DefaultRayLength);
        }
    }
        private void WandIndicateCheck()
        {
            // Temporary.
            FakeWandMovement temp = FindObjectOfType <FakeWandMovement>();

            if (temp != null &&
                temp.m_WandIsDisplayed)
            {
                WandIndicate();
                return;
            }

            if (null == TheSelectionManager.GetSelection())
            {
                WandHide();
            }
            else
            {
                WandIndicate();
                if (
#if UNITY_EDITOR
                    Input.GetButton("Fire1")
#else
                    MiddleVR.VRDeviceMgr.IsWandButtonPressed(0)
#endif
                    )
                {
                    theWand.SetRayColor(changeColorButtonPush);
                }
            }
        }