Exemplo n.º 1
0
 private void Update()
 {
     m_menu.Show(Position != Vector2.zero);
     if (m_menu.gameObject.activeInHierarchy)
     {
         m_menu.SetTouchPosition(Position);
         m_menu.ActivateHighlithedSection();
     }
 }
Exemplo n.º 2
0
 private void UpdateTouchPosition(XRController controller, XRRayInteractor interactor)
 {
     if (controller.controllerNode == hand &&
         controller.inputDevice.TryGetFeatureValue(CommonUsages.primary2DAxis, out Vector2 touchPosition) &&
         touchPosition != Vector2.zero)
     {
         RadialMenu.SetTouchPosition(touchPosition);
         if (touchPosition.magnitude > 0.9f)
         {
             RadialMenu.ActivateHighlithedSection();
             RadialMenu.Show(false);
         }
     }
 }