You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

A-Frame无法正确加载Oculus Quest 2控制器模型问题问询

AFrame加载Oculus Quest 2控制器原生解决方案

问题原因

AFrame 1.3.0及更早版本的oculus-touch-controls组件默认仅内置了Quest 1代控制器的模型资源,因此即便在Quest 2设备上访问,也会加载初代控制器模型,默认配置不会自动识别设备版本切换模型。

可行原生方案

方案1:升级AFrame版本后调整配置(推荐)

  • 升级AFrame版本至1.4.0及以上,该版本开始原生内置Quest 2控制器模型资源
  • 修改oculus-touch-controls组件配置,新增model: oculus-touch-v2参数即可指定加载Quest 2控制器模型,示例代码如下:
<a-entity oculus-touch-controls="hand: left; model: oculus-touch-v2"></a-entity>
<a-entity oculus-touch-controls="hand: right; model: oculus-touch-v2"></a-entity>

方案2:低版本AFrame原生适配方案

若无法升级AFrame版本,可通过禁用默认模型、手动指定设备追踪规则的方式实现:

  • 关闭原oculus-touch-controls的自动模型加载,手动绑定Quest 2模型标识,搭配tracked-controls原生组件保证控制器交互正常,示例代码如下:
<!-- 左手控制器 -->
<a-entity 
  oculus-touch-controls="hand: left; model: false"
  tracked-controls="hand: left; idPrefix: oculus-touch-"
  gltf-model="url(assets/oculus-touch-v2/left.gltf)"
></a-entity>
<!-- 右手控制器 -->
<a-entity 
  oculus-touch-controls="hand: right; model: false"
  tracked-controls="hand: right; idPrefix: oculus-touch-"
  gltf-model="url(assets/oculus-touch-v2/right.gltf)"
></a-entity>

注:低版本原生适配需自行准备Quest 2控制器的gltf模型资源,不需要引入第三方额外组件,仅使用AFrame原生能力即可实现

内容的提问来源于stack exchange,提问作者Jaydee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.26 16:06:10