收藏
回答

和arTracker同时使用,camera-orbit-control不生效?

问题:AR识别图片后出的模型不可操作

期望:模型可手动操作旋转

微信版本: 8.0.45

基础库版本:3.3.0

系统版本: ios 17.1.1

<xr-scene ar-system="modes:Marker" id="xr-scene" bind:ready="handleReady" bind:ar-ready="handleARReady">
  <xr-assets bind:progress="handleAssetsProgress" bind:loaded="handleAssetsLoaded">
    <xr-asset-load type="env-data" asset-id="env1" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/env-test.bin" />
    <xr-asset-load type="gltf" asset-id="gltf-damageHelmet" src="https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/damage-helmet/index.gltf" />
  </xr-assets>
  <xr-env env-data="env1"/>
  <xr-node>
    <xr-ar-tracker mode="Marker" src="/assets/1.jpg" bind:ar-tracker-switch="handleTrackerSwitch">
      <xr-gltf node-id="gltf-damageHelmet" position="0 0 0" rotation="0 -50 0" scale="0.6 0.6 0.6" model="gltf-damageHelmet"></xr-gltf>
    </xr-ar-tracker>
    <xr-camera
      id="camera" node-id="camera" position="1 1 1" clear-color="0.925 0.925 0.925 1"
      far="20" background="ar" is-ar-camera camera-orbit-control=""
    ></xr-camera>
  </xr-node>
  <xr-node node-id="lights">
    <xr-light type="ambient" color="1 1 1" intensity="0.3" />
    <xr-light type="directional" rotation="30 60 0" color="1 1 1" intensity="1" />
  </xr-node>
</xr-scene>

代码片段:https://developers.weixin.qq.com/s/j0maGjmU7mOb


回答关注问题邀请回答
收藏
登录 后发表内容