【发布时间】:2020-08-18 10:49:24
【问题描述】:
使用简单平面作为导航网格并设置我的装备的运动控制 =“constrainToNavMesh: true”时出现以下错误。
aframe-extras.min.js:1 Uncaught TypeError: Cannot read property 'forEach' of undefined
at m.getClosestNode (aframe-extras.min.js:1)
at o.getNode (aframe-extras.min.js:1)
at i.<anonymous> (aframe-extras.min.js:1)
at HTMLElement.tick (a-scene.js:709)
at HTMLElement.render (a-scene.js:759)
at bind.js:12
at f (three.js:24703)
at e (three.js:15038)
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.0/dist/aframe-extras.min.js"></script>
<script src="//cdn.rawgit.com/donmccurdy/aframe-physics-system/v4.0.1/dist/aframe-physics-system.min.js"></script>
<a-entity id="rig" position="0 0 0" movement-controls="constrainToNavMesh: true">
<a-entity id="camera" camera position="0 1.6 0"></a-entity>
</a-entity>
<a-entity geometry="primitive: plane; height: 350; width: 350;" position="0 0 0" rotation="-90 0 0" static-body nav-mesh>
</a-entity>
这是一个已知的错误吗?我首先认为存在冲突,但即使删除了所有其他包含,问题仍然存在。所有模型加载正常,其他一切正常。
仅当按箭头键开始移动时才会发生错误。有什么建议吗?
【问题讨论】:
标签: aframe