YujiKaneko Posted June 7 Share Posted June 7 Hello all, I want to perform eye tracking with HTC VIVE Pro Eye, Windows 11, and VIVE OpenXR, but I don't know how to do it. I wrote the following Unity script, but it shows "No eye tracking device found". public class EyeTracking : MonoBehaviour { public Vector3 gazeDirection; private InputDevice eyeTrackingDevice; void Start() { List<InputDevice> devices = new List<InputDevice>(); InputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.EyeTracking, devices); if (devices.Count > 0) { eyeTrackingDevice = devices[0]; } else { Debug.LogError("No eye tracking device found"); } } void Update() { gazeDirection = Vector3.zero; if (eyeTrackingDevice.isValid) { InputFeatureUsage<Vector3> eyeGazeDirectionUsage = new InputFeatureUsage<Vector3>("eyeGazeDirection"); if (eyeTrackingDevice.TryGetFeatureValue(eyeGazeDirectionUsage, out Vector3 gazeDir)) { gazeDirection = gazeDir; } } } } My settings are: Edit -> Project Settings -> XR Plug-in Management -> OpenXR enabled Edit -> Project Settings -> XR Plug-in Management -> OpenXR -> Interaction Profiles and added Eye Gaze Interaction Profile Can anyone provide guidance on what might be wrong or missing in my setup? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now