void HandleGrip(ButtonStage buttonStage, Vector2 axis)
 {
     switch (buttonStage)
     {
     case ButtonStage.PressDown:
         DynamicMeshScript.SetMeshDisplay(!DynamicMeshScript.ShowDynamicCollision);
         break;
     }
 }
Example #2
0
        void HandleTouchpad(ButtonStage buttonStage, Vector2 axis)
        {
            switch (buttonStage)
            {
            case ButtonStage.PressDown:

                TouchpadDirection touchpadDirection = ViveSR_Experience_ControllerDelegate.GetTouchpadDirection(axis, false);

                if (touchpadDirection == TouchpadDirection.Up)
                {
                    DynamicMeshScript.SetMeshDisplay(!DynamicMeshScript.ShowDynamicCollision);
                    DisplayMesh.text = DisplayMesh.text == "[Show]" ? "[Hide]" : "[Show]";
                }
                else if (touchpadDirection == TouchpadDirection.Down)
                {
                    dartGenerator.DestroyObjs();
                }
                break;
            }
        }