【发布时间】:2022-04-22 23:08:14
【问题描述】:
我使用 ar.js 和 aframe 将多个对象加载到 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