aframe - 无法在 Oculus Go 上控制 VR 中的相机位置
问题描述
我正在使用 aframe 为 Oculus Go 创建体验。我有一个简单的“世界”,我可以使用 Oculus Go 控制器在它周围移动。但是,我似乎无法在任何时候设置初始相机位置或重置相机位置。最初的问题意味着我的观点总是贴近地面。
这是我的代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Pailou Gate</title>
<meta name="description" content="Pailou Gate">
<script src="../aframe/dist/aframe-master.js"></script>
<script src="//cdn.rawgit.com/donmccurdy/aframe-extras/v4.1.2/dist/aframe-extras.min.js"></script>
</head>
<body>
<a-scene background="color: #9cf" antialias="true">
<a-assets>
<a-asset-item id="pl" src="pl.dae"></a-asset-item>
</a-assets>
<a-entity wasd-controls mouse-controls look-controls movement-controls="fly: false" position="0 0 0">
<a-entity camera position="0 4 0"></a-entity>
<a-entity oculus-go-controls></a-entity>
<a-entity laser-controls="hand: right"></a-entity>
</a-entity>
<a-light position="0 0.5 1" intensity="0.8"></a-light>
<a-light type="point" position="20 30 -40" intensity="0.9" light="castShadow: true;"></a-light>
<a-collada-model src="#pl" position="0 0.4 0" rotation="0 0 0" scale="1 1 1" shadow="cast: true; receive: false"></a-collada-model>
<a-circle rotation="-90 0 0" radius="40" color="#393" position="0 -0.1 0" shadow="receive: true" roughness="1"></a-circle>
<a-torus radius="40" arc="360" color="#6c6" rotation="-90 0 0"></a-torus>
</a-scene>
</body>
</html>
我认为相关位是相机周围的实体和相机本身。请注意,我确实将相机设置得很高,但这似乎被忽略了。
有什么想法吗?
肖恩
解决方案
设置相机装备(相机的父实体)上的位置和移动控制以及相机上的外观控制:
<a-entity wasd-controls position="0 4 0">
<a-entity camera look-controls></a-entity>
</a-entity>
推荐阅读
- android - 停止从 BroadcastReceiver 启动的 Android 媒体播放器循环
- android - 如何在现有的 React Native App 中集成原生 ios 相机 SDK?
- javascript - 我正在尝试在模式对话框中打开视频
- python - 无法覆盖 django 信号中的变量值
- c# - 在C#中获取“参数字典包含方法X的不可空类型'System.Int32'的参数'ID'的空条目”
- pandas - replace strings of one row if one of the columns has specific string
- java - Replace a string with regex java
- python - 引擎的 SQLAlchemy 更改数据库
- python-3.x - 无法创建连接不同数据库的 postgresql 视图 - odoo 11
- vb.net - 尝试在注册表中添加我的用户名以获得读取权限,我尝试使用源代码,它没有将我的用户添加到注册表->权限