private void disableAllGroups() { for (int i = 0; i < GroupNames.Length; i++) { HandPool.DisableGroup(GroupNames[i]); } }
// Start is called before the first frame update void Start() { MyLeapSettings settings = FindObjectOfType <MyLeapSettings>(); HandModelManager handModelManager = GetComponent <HandModelManager>(); if (settings.enableHand) { handModelManager.EnableGroup("Rigged Hands"); } else { handModelManager.DisableGroup("Rigged Hands"); } }
private void UpdateHands() { for (int i = 0; i < manager.GetHandPoolSize(); i++) { if (i == activeModel) { manager.EnableGroup(manager.GetHandModelName(i)); } else { manager.DisableGroup(manager.GetHandModelName(i)); } } }
void FinishCalibration() { SharedData.calibrationData.leapMotionOffset = leapMotionOffset.localPosition; SharedData.calibrationData.leapMotionRotation = leapMotionOffset.localRotation; SharedData.calibrationData.SaveToFile(); isCalibrating = false; leapHandModelManager.DisableGroup("Rigged Hands"); StartCoroutine(ExecuteAfterTime(() => { finishCalibrationCallback?.Invoke(); finishCalibrationCallback = null; Debug.Log("LeapMotionControllerCursorBehaviour: finished calibration."); }, 1)); // avoid bug when trying to disable hands group in leap motion }