使用A-frame将注视按钮添加到场景 [英] Add gaze buttons to scene using A-frame

查看:435
本文介绍了使用A-frame将注视按钮添加到场景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在



此YouTube教程,我发现如何添加点击控件。你可以用相同的方式注视事件吗?

解决方案

您可以通过使用fuse属性来选择一个项目光标组件。检查A-Frame文档:
https://aframe.io/docs/0.5.0/components/cursor.html#fuse-based-cursor



这将触发点击事件在项目上,所以您还需要为点击事件的项目设置一个监听器。


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?

解决方案

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.

这篇关于使用A-frame将注视按钮添加到场景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆