本文介绍了Aframe Android Chrome相机总是向后看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hidiho社区

我有一个问题,当我用Android手机打开aframe网页时,摄像头(或场景)会旋转180度。我使用正常的Aframe示例 https://aframe.io/examples/showcase/helloworld/但仍然有一些解决办法?我已经尝试过使用javascript一开始将相机旋转设置为0 0 0,但是它不起作用。我的电话是小米redmi note 4,问题仅出现在Chrome中。

I have this issue that when I open an aframe-webpage with my Android phone that the camera (or the scene) turns 180 degrees. I use the normal Aframe example https://aframe.io/examples/showcase/helloworld/ but it still happens some ideas how to fix that? I already tried setting the camera rotation to 0 0 0 at the start with javascript but it doesn't work. My Phone is a xiaomi redmi note 4 and the problem just occurs in chrome.

 <!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Hello, WebVR! • A-Frame</title>
    <meta name="description" content="Hello, WebVR! • A-Frame">
    <script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script>
  </head>
  <body>
    <a-scene background="color: #ECECEC">
      <a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box>
      <a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E" shadow></a-sphere>
      <a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow></a-cylinder>
      <a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4" shadow></a-plane>
    </a-scene>
  </body>
</html>


推荐答案

啊,好吧,我发现这只是发生在我身上xiaomi redmi note 4.如果有人也可以,可以在这里发布,以便我们知道这只是我的手机。也欢迎对其他有问题的手机进行评论。

ah ok i figured out that this just happens on my xiaomi redmi note 4. If someone has also one maybe he could post it here so we know if this just my phone. Reviews about other phones with the problem would be welcome too.

这篇关于Aframe Android Chrome相机总是向后看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-15 12:36