/// <summary> /// Sets pointer behavior to mimic HoloLens 2 /// PokePointer will be Default /// GrabPointer will be Default /// HandRayPointer will be Default /// MotionControllerRayPointer will be off /// GazePointer will be Off /// </summary> public void SetHoloLens2() { PointerUtils.SetHandPokePointerBehavior(PointerBehavior.Default, Handedness.Any); PointerUtils.SetHandGrabPointerBehavior(PointerBehavior.Default, Handedness.Any); PointerUtils.SetHandRayPointerBehavior(PointerBehavior.Default, Handedness.Any); PointerUtils.SetMotionControllerRayPointerBehavior(PointerBehavior.AlwaysOff, Handedness.Any); PointerUtils.SetGazePointerBehavior(PointerBehavior.AlwaysOff); }
/// <summary> /// Sets the <see cref="Microsoft.MixedReality.Toolkit.Input.PointerBehavior"/> for all controller rays to be AlwaysOff /// <param name="isEnabled">If true, behavior will be set to Default. /// Otherwise it will be set to AlwaysOff</param> /// </summary> public void SetControllerRayEnabled(bool isEnabled) { PointerUtils.SetMotionControllerRayPointerBehavior(isEnabled ? PointerBehavior.Default : PointerBehavior.AlwaysOff, Handedness.Any); }