/// <summary> /// Set the control options and modify the trackables to match. /// </summary> /// <param name="givenControlOptions">The control options to set the current control options to.</param> public virtual void SetControlOptions(ControlOptions givenControlOptions) { controlOptions = givenControlOptions; trackedObjects.Clear(); if (controllerLeftHand != null && controllerRightHand != null && (controlOptions.Equals(ControlOptions.HeadsetAndControllers) || controlOptions.Equals(ControlOptions.ControllersOnly))) { trackedObjects.Add(VRTK_DeviceFinder.GetActualController(controllerLeftHand).transform); trackedObjects.Add(VRTK_DeviceFinder.GetActualController(controllerRightHand).transform); } if (headset != null && (controlOptions.Equals(ControlOptions.HeadsetAndControllers) || controlOptions.Equals(ControlOptions.HeadsetOnly))) { trackedObjects.Add(headset.transform); } }
/// <summary> /// Set the control options and modify the trackables to match. /// </summary> /// <param name="givenControlOptions">The control options to set the current control options to.</param> public void SetControlOptions(ControlOptions givenControlOptions) { controlOptions = givenControlOptions; trackedObjects.Clear(); if (controlOptions.Equals(ControlOptions.HeadsetAndControllers) || controlOptions.Equals(ControlOptions.ControllersOnly)) { trackedObjects.Add(controllerLeftHand.transform); trackedObjects.Add(controllerRightHand.transform); } if (controlOptions.Equals(ControlOptions.HeadsetAndControllers) || controlOptions.Equals(ControlOptions.HeadsetOnly)) { trackedObjects.Add(headset.transform); } }