【问题标题】:ar.js/Aframe multiple objects on location based tracking not working properly基于位置的跟踪的 ar.js/Aframe 多个对象无法正常工作
【发布时间】:2022-04-22 23:08:14
【问题描述】:

我使用 ar.jsaframe 将多个对象加载到 a-scene 中,但没有看到它们应该在的位置(根据地图坐标/latlng),我将它们全部带到同一个位置。例如,我有一个 a-entity 的 latlng 值朝南,还有一个 a-entity 的 latlng 朝北。发生的情况是两个实体都出现在北侧或南侧,而不是它们应该在的地方。这是我的代码:

    <a-scene
        vr-mode-ui="enabled: false"
        embedded
        arjs='sourceType: webcam; sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960; debugUIEnabled: false;'>
        <a-camera gps-camera rotation-reader far="5000"></a-camera>
        <a-entity gltf-model="/path/to/model" rotation="0 180 0" scale="0.70 0.70 0.70" gps-entity-place="<here are values of lat and long towards north>" animation-mixer/>
        <a-entity gltf-model="/path/to/model" rotation="0 180 0" scale="0.70 0.70 0.70" gps-entity-place="<here are values of lat and long towards south>" animation-mixer/>
    </a-scene>

【问题讨论】:

    标签: javascript augmented-reality aframe ar.js


    【解决方案1】:

    我认为您需要在 &lt;a-camera /&gt; 元素中使用 gps-projected-camera 而不是 gps-camera

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-27
      • 1970-01-01
      • 1970-01-01
      • 2021-01-25
      • 2016-01-06
      相关资源
      最近更新 更多