示例#1
0
 private void ResetRightContrller(bool status)
 {
     if (controllerRight == null)
     {
         NoloVR_TrackedDevice[] devices = m_Target.GetComponentsInChildren <NoloVR_TrackedDevice>();
         foreach (NoloVR_TrackedDevice item in devices)
         {
             if (item.deviceType == NoloDeviceType.RightController)
             {
                 controllerRight = item;
             }
         }
         if (controllerRight == null)
         {
             controllerRight = m_Target.transform.Find("ControllerTracker/RightController").GetComponent <NoloVR_TrackedDevice>();
         }
     }
     if (controllerRight != null)
     {
         controllerRight.gameObject.SetActive(status);
     }
     else
     {
         Debug.LogWarning("not find controller right");
     }
 }
示例#2
0
 // Use this for initialization
 void OnEnable()
 {
     trackedDevice = GetComponentInParent <NoloVR_TrackedDevice>();
     touchpad      = transform.FindChild("buttons/button_touchpad");
     menu          = transform.FindChild("buttons/button_menu");
     system        = transform.FindChild("buttons/button_system");
     grip_left     = transform.FindChild("buttons/button_grip_left");
     grip_right    = transform.FindChild("buttons/button_grip_right");
     trigger       = transform.FindChild("buttons/button_trigger");
 }
示例#3
0
 public static NoloDevice GetDevice(NoloVR_TrackedDevice trackedObject)
 {
     return(GetDevice(trackedObject.deviceType));
 }