用Oculus触摸控制器可以在A帧项目中移动摄像机吗?
找不到任何有用的例子。
发布于 2022-02-16 21:27:53
您可以尝试并重用现有组件。wasd控制在移动方面运行良好,因此您可以使用拇指棒输入而不是wasd
键编写类似的组件。
这很简单--为控制器+摄像机创建一个钻机,并将附加到任何控制器:
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
<script src="https://gftruj.github.io/webzamples/aframe/controls/oculus-thumbstick-controls.js"></script>
<a-scene>
<!-- Camera + controllers rig -->
<a-entity id="rig">
<a-camera position="0 1.6 0"></a-camera>
<a-entity oculus-touch-controls="hand: left" ></a-entity>
<a-entity oculus-touch-controls="hand: right" oculus-thumbstick-controls></a-entity>
</a-entity>
</a-scene>
https://stackoverflow.com/questions/71131300
复制相似问题