We’ll first go over gaze-based interactions. Gaze-based interactions rely on rotating our heads and looking at objects to interact with them. This type of interaction is for headsets without a controller. Even with a rotation-only controller (Daydream, GearVR), the interaction is still similar. Since A-Frame provides mouse-drag controls by default, gaze-based can sort of be used on desktop to preview the interaction by dragging the camera rotation.
To add gaze-based interaction, we need to add or implement a component. A-Frame comes with a cursor component that provides gaze-based interaction if attached to the camera:
a-cursor
entity as a child element underneath the camera entity.<a-scene>
<a-camera>
<a-cursor></a-cursor>
<!-- Or <a-entity cursor></a-entity> -->
</a-camera>
</a-scene>