2
<!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 헤드셋이 있습니다) ... 움직임을 감지하는 솔루션이 있습니까 헤드셋 만."Aframe"을 사용하여 만든 컨트롤러가 아닌 헤드셋 만 사용하여 webvr에서 이동을 수행하는 방법
컨트롤러를 사용하여 동작을 수행 할 수 있습니까? 컨트롤러를 작동 시키려면 다른 코드를 추가해야합니까? –
aframe-extras 링크의 문서 및 예를 참조하십시오. 게임 패드를 지원하지만 [추적 컨트롤러로 순간 이동] (https://github.com/fernandojsg/aframe-teleport-controls)과 같은 추가 구성 요소가 필요합니다. –