Search code examples
eventscontrolsaframegaze-buttons

Add gaze buttons to scene using A-frame


Is there a way to add gaze buttons in ? Note also for a better experience there must be an little progress bar to know how long the user must look to it.

I've looked inside the inspector tools but nothing found that works.

In this YouTube tutorial, I've found how to add click controls. Is it the same way I could make gaze events?


Solution

  • You can select an item by gazing at it using the fuse property of the cursor component. Check the A-Frame docs here: https://aframe.io/docs/0.5.0/components/cursor.html#fuse-based-cursor

    This will trigger a click event on the item, so you also need to have a listener set up on the item for the click event.