aframe - 如何更改每个实体内的 A 帧相机旋转?
问题描述
我很难在我的项目中更改相机旋转。
https://glitch.com/~camera-experiment
每次用户移动到新的“区域”时,我都需要相机旋转以面向不同的方向。这些区域只是具有不同的背景图像。
理想情况下,我只想旋转每个实体的背景图像,但我也不能这样做。
有没有人有任何建议?任何帮助将不胜感激!
解决方案
使用相机装备/包装实体并更改其旋转。aframe - 在运行时设置相机位置
<a-entity id='cameraRig'>
<a-camera></a-camera>
</a-entity>
document.querySelector("#cameraRig").object3D.rotation.set(x, y, z); // Radians. Can use setAttribute for degrees or convert manually.
推荐阅读
- c - 从函数返回的 GtkWidget* 导致分段错误
- radare2 - 如何在radare2中为全局变量命名?
- spring-boot - Error while running Spring Boot application - java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/AnnotationIntrospector
- scala - Convert spark scala dataset to specific RDD format
- c# - Find and Replace inside of HtmlWebViewSource property
- assembly - 如何在 ARM7 上执行模数?
- matlab - 应用程序设计器点未出现在绘图上
- jenkins - 在 Groovy 脚本中传递命令行输入
- reactjs - I can not deploy react app on github pages
- html - HTML table scraping in R