【发布时间】:2020-01-26 12:40:16
【问题描述】:
我使用基于凝视的控件和 A 帧光标组件进行导航。虽然它在我的桌面和移动浏览器中完美运行,但光标是固定的,在 VR 模式下不会移动(不适用于 Google Cardboard,也不适用于 Oculus 浏览器或 Firefox Reality)。
这是我使用的代码:
<a-camera>
<a-cursor
cursor="fuse: true; fuseTimeout: 2000"
position="0 0 -1"
geometry="primitive: ring; radiusInner: 0.01; radiusOuter: 0.02"
material="color: red; shader: flat">
</a-cursor>
</a-camera>
我在 HTML 的头部使用以下脚本:
<script src="https://aframe.io/releases/1.0.3/aframe.min.js"></script>
<script src="https://unpkg.com/aframe-event-set-component@5/dist/aframe-event-set-component.min.js"></script>
<script src="https://unpkg.com/aframe-layout-component@5.3.0/dist/aframe-layout-component.min.js"></script>
<script src="https://unpkg.com/aframe-template-component@3.2.1/dist/aframe-template-component.min.js"></script>
<script src="https://unpkg.com/aframe-proxy-event-component@2.1.0/dist/aframe-proxy-event-component.min.js"></script>
【问题讨论】: