Exemplo n.º 1
0
    private void _SetVirtualHandMapping(EVirtualHandMapping iVirtualHandMapping)
    {
        VirtualHandMapping = iVirtualHandMapping;

        VRInteractionVirtualHandGogo virtualHandGogo = m_Wand.GetComponent <VRInteractionVirtualHandGogo>();

        if (virtualHandGogo == null)
        {
            MVRTools.Log(2, "[~] The virtual hand  Gogo script is missing on the Wand.");
            return;
        }

        switch (VirtualHandMapping)
        {
        case EVirtualHandMapping.Direct:
            MiddleVR.VRInteractionMgr.Deactivate(virtualHandGogo.GetInteraction());
            break;

        case EVirtualHandMapping.Gogo:
            MiddleVR.VRInteractionMgr.Activate(virtualHandGogo.GetInteraction());
            break;

        default:
            break;
        }
    }
Exemplo n.º 2
0
    private void _SetVirtualHandMapping(EVirtualHandMapping iVirtualHandMapping)
    {
        VirtualHandMapping = iVirtualHandMapping;

        VRInteractionVirtualHandGogo virtualHandGogo = m_Wand.GetComponent<VRInteractionVirtualHandGogo>();
        if (virtualHandGogo == null)
        {
            MVRTools.Log(2, "[~] The virtual hand  Gogo script is missing on the Wand.");
            return;
        }

        switch (VirtualHandMapping)
        {
            case EVirtualHandMapping.Direct:
                MiddleVR.VRInteractionMgr.Deactivate(virtualHandGogo.GetInteraction());
                break;

            case EVirtualHandMapping.Gogo:
                MiddleVR.VRInteractionMgr.Activate(virtualHandGogo.GetInteraction());
                break;

            default:
                break;
        }
    }