<!DOCTYPE html>
<html>
<head>
<title>Forest</title>
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<script src="https://rawgit.com/feiss/aframe-environment-component/master/dist/aframe-environment-component.min.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<a-asset-item id="brainstem" src="https://cdn.aframe.io/test-models/models/brainstem/BrainStem.gltf"></a-asset-item>
</a-assets>
<a-entity environment="preset: forest; groundColor: green; grid: cross"></a-entity>
<a-entity gltf-model="#brainstem" position="0 0 -5" scale="3 3 3"></a-entity>
<a-box position="-2 0.5 -17" rotation="0 0 0" color="#4CC3D9" width="10"></a-box>
<a-box position="-2 0.5 -10" rotation="0 0 0" color="#4CC3D9" width="10"></a-box>
<a-box position="-2 0.5 -3" rotation="0 0 0" color="#4CC3D9" width="10"></a-box>
<a-box position="10 0.5 -8" rotation="0 90 0" color="brown" width="1.5" height="0.5"></a-box>
<a-sky color="black"></a-sky>
</a-scene>
</body>
</html>
我正在使用框架来构建上述模型...当我在智能手机上运行它并移动设备时,它会检测到旋转运动,但当我向前或向后移动时不会响应...我没有完整的 VR 套件(我有 VR 耳机)...是否有任何解决方案可以仅使用耳机来检测运动。
最佳答案
当前的手机无法检测位置运动(6DoF),只能检测旋转(3DoF)。没有好的办法解决这个问题,GPS 定位不够精确。对于移动 VR 场景,您应该考虑其他移动方式,例如传送到检查点或按下纸板按钮前进。 aframe-extras 中都有这两个示例。 .
关于html - 如何仅使用耳机而不使用 Controller 在 webvr 中进行移动,使用 "Aframe"制作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46713776/