/// <inheritdoc /> public override void Update() { var profile = InputSimulationProfile; if (profile.IsCameraControlEnabled) { EnableCameraControl(); if (CameraCache.Main) { cameraControl.UpdateTransform(CameraCache.Main.transform); } } else { DisableCameraControl(); } if (profile.SimulateEyePosition) { // In the simulated eye gaze condition, let's set the eye tracking calibration status automatically to true InputSystem?.EyeGazeProvider?.UpdateEyeTrackingStatus(this, true); // Update the simulated eye gaze with the current camera position and forward vector InputSystem?.EyeGazeProvider?.UpdateEyeGaze(this, new Ray(CameraCache.Main.transform.position, CameraCache.Main.transform.forward), DateTime.UtcNow); } switch (profile.HandSimulationMode) { case HandSimulationMode.Disabled: DisableHandSimulation(); break; case HandSimulationMode.Articulated: case HandSimulationMode.Gestures: EnableHandSimulation(); if (UserInputEnabled) { handDataProvider.UpdateHandData(HandDataLeft, HandDataRight); } break; } }
/// <inheritdoc /> public override void Update() { var profile = InputSimulationProfile; if (profile.IsCameraControlEnabled) { EnableCameraControl(); if (CameraCache.Main) { cameraControl.UpdateTransform(CameraCache.Main.transform); } } else { DisableCameraControl(); } if (profile.SimulateEyePosition) { MixedRealityToolkit.InputSystem?.EyeGazeProvider?.UpdateEyeGaze(null, new Ray(CameraCache.Main.transform.position, CameraCache.Main.transform.forward), System.DateTime.UtcNow); } switch (profile.HandSimulationMode) { case HandSimulationMode.Disabled: DisableHandSimulation(); break; case HandSimulationMode.Articulated: case HandSimulationMode.Gestures: EnableHandSimulation(); if (UserInputEnabled) { handDataProvider.UpdateHandData(HandDataLeft, HandDataRight); } break; } }