A 帧:光标在 VR 中固定不动
A-Frame: Cursor is fixed and not moving in VR
我使用基于凝视的控件和 A 帧光标组件来导航。虽然它在我的桌面和移动浏览器中完美运行,但光标在 VR 模式下是固定的并且不会移动(不适用于 Google 纸板,也不适用于 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>
这是一个最近修复的错误。它将在 1.0.4 中发布,但您可以同时使用主版本:
我使用基于凝视的控件和 A 帧光标组件来导航。虽然它在我的桌面和移动浏览器中完美运行,但光标在 VR 模式下是固定的并且不会移动(不适用于 Google 纸板,也不适用于 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>
这是一个最近修复的错误。它将在 1.0.4 中发布,但您可以同时使用主版本: