Esempio n. 1
0
        public void Start()
        {
            ViveBridge = new GameObject("ViveBridge").AddComponent <ViveBridge>();

            radialMenu = GetComponentInChildren <ViveNetRadialMenu>();
            radialMenu.gameObject.SetActive(false);
            var viveRightController = ViveRightController.GetComponentInChildren <SteamVR_TrackedController>();

            viveRightController.PadUnclicked        += ViveRightController_PadUnclicked;
            viveRightController.TriggerUnclicked    += ViveRightController_TriggerUnclicked;
            viveRightController.TriggerClicked      += ViveRightController_TriggerClicked;
            viveRightController.Ungripped           += ViveRightController_Ungripped;
            viveRightController.MenuButtonUnclicked += ViveRightController_MenuButtonUnclicked;
            viveManipulator  = new ViveManipulator(gameObject, ViveBridge);
            primitiveManager = new PrimitiveManager();
            boxObject        = new Dictionary <string, GameObject>();
            device           = SteamVR_Controller.Input((int)viveRightController.controllerIndex);
        }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        ViveBridge      = GameObject.Find("ViveBridge").GetComponent <ViveBridge>();
        viveManipulator = new ViveManipulator(gameObject, ViveBridge);
        rayMesh         = GetComponentInChildren <MeshRenderer>().transform.parent.gameObject;

        boxObject = new Dictionary <string, GameObject>();

        radialMenu = GetComponentInChildren <ViveNetRadialMenu>();

        Debug.Log("IsServer: " + isServer);
        ViveBridge.TriggerClicked   += ViveBridge_TriggerClicked;
        ViveBridge.TriggerClicked   += ViveBridge_TriggerClicked;
        ViveBridge.TriggerUnclicked += ViveBridge_TriggerUnclicked;
        ViveBridge.PadClicked       += ViveBridge_PadClicked;
        ViveBridge.PadUnclicked     += ViveBridge_PadUnclicked;
        ViveBridge.Ungripped        += ViveBridge_Ungripped;
        ViveBridge.MenuUnclicked    += ViveBridge_MenuUnclicked;
        radialMenu.gameObject.SetActive(false);
        primitiveManager = new PrimitiveManager();
    }