How do I add eye tracking

Asked on 08/18/2024

1 search

To add eye tracking in your application, you can utilize the capabilities introduced with visionOS. VisionOS allows for natural input using eye tracking to target interaction regions in an app or webpage. When a user looks at an interaction region, it is highlighted, and they can interact by tapping their fingers together. This feature is part of the spatial web optimization, as discussed in the session Optimize for the spatial web.

For more detailed implementation, you might want to explore the session on building immersive web experiences with WebXR, which discusses how to handle input sources and interaction using eye tracking and hand tracking. This session is titled Build immersive web experiences with WebXR.

If you are interested in object tracking and anchoring virtual content to real-world objects, the session Explore object tracking for visionOS provides insights into creating reference objects and anchoring virtual content.