Exemple #1
0
    private void _SetManipulation(EManipulation iManpulation)
    {
        Manipulation = iManpulation;

        VRInteractionManipulationRay   manipulationRay   = m_Wand.GetComponent <VRInteractionManipulationRay>();
        VRInteractionManipulationHomer manipulationHomer = m_Wand.GetComponent <VRInteractionManipulationHomer>();

        if (manipulationRay == null || manipulationHomer == null)
        {
            MVRTools.Log(2, "[~] Some manipulation scripts are missing on the Wand.");
            return;
        }

        switch (Manipulation)
        {
        case EManipulation.None:
            MiddleVR.VRInteractionMgr.Deactivate(manipulationRay.GetInteraction());
            MiddleVR.VRInteractionMgr.Deactivate(manipulationHomer.GetInteraction());
            break;

        case EManipulation.Ray:
            MiddleVR.VRInteractionMgr.Activate(manipulationRay.GetInteraction());
            break;

        case EManipulation.Homer:
            MiddleVR.VRInteractionMgr.Activate(manipulationHomer.GetInteraction());
            break;

        default:
            break;
        }
    }
Exemple #2
0
    private void _SetManipulation(EManipulation iManpulation)
    {
        Manipulation = iManpulation;

        VRInteractionManipulationRay   manipulationRay   = m_Wand.GetComponent<VRInteractionManipulationRay>();
        VRInteractionManipulationHomer manipulationHomer = m_Wand.GetComponent<VRInteractionManipulationHomer>();
        if (manipulationRay == null || manipulationHomer == null)
        {
            MVRTools.Log(2, "[~] Some manipulation scripts are missing on the Wand.");
            return;
        }

        switch (Manipulation)
        {
            case EManipulation.None:
                MiddleVR.VRInteractionMgr.Deactivate(manipulationRay.GetInteraction());
                MiddleVR.VRInteractionMgr.Deactivate(manipulationHomer.GetInteraction());
                break;

            case EManipulation.Ray:
                MiddleVR.VRInteractionMgr.Activate(manipulationRay.GetInteraction());
                break;

            case EManipulation.Homer:
                MiddleVR.VRInteractionMgr.Activate(manipulationHomer.GetInteraction());
                break;

            default:
                break;
        }
    }