【问题标题】:A-Frame: Cursor is fixed and not moving in VRA-Frame:光标在 VR 中是固定不动的
【发布时间】: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>

【问题讨论】:

    标签: aframe virtual-reality


    【解决方案1】:

    这是最近修复的错误。它将在 1.0.4 中发布,但您可以同时使用主版本:

    https://cdn.jsdelivr.net/gh/aframevr/aframe@130f5846ac7cb99dff0e30d703c15c046c066529/dist/aframe-master.min.js

    【讨论】:

    • 非常感谢。现在工作:)。我暂时移到了 1.01 版本,1.04 版本一发布就会安装。
    猜你喜欢
    • 1970-01-01
    • 2020-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多