Retrieving eye gaze information from OpenXR in your app
The realm of VR has evolved to the extent that some HMDs are now equipped with the capability to track the user’s eye gaze. This feature, which identifies the direction in which the user is looking, can be harnessed for a variety of tasks, enhancing the interactivity and immersion of VR experiences. In this recipe, we will guide you through the process of enabling and retrieving eye gaze data from OpenXR in your application. Additionally, we will illustrate how to calculate the focal region—the specific area the user is looking at—in pixel coordinates on the render target used for display.
Getting ready
For this recipe, you will need an HMD that supports eye-tracking features, such as Meta’s Quest Pro. You will also need to provide permission to the app to track the user’s eye, which can be achieved through the Settings menu on most devices.
Also, get acquainted with how spaces and actions...