2016-11-14 34 views
1

我可以做任何事情,但我的盒子總是在相機開始時。哪裏不對?我想創建一條街道,我想把一個箱子放在左邊,一個放在房子的右邊。A-box盒子/相機位置

<html> 
    <head> 
    <meta charset="utf-8"> 
    <title>something</title> 
    <meta name="description" content="something"> 
    <meta name="apple-mobile-web-app-capable" content="yes"> 
     </head> 
    <body> 
      <a-assets> 
      <img id="texture_0" src="textures/floor.jpg"> 
      <img id="texture_1" src="textures/house1.jpg"> 
      <img id="sky" src="background/sky.jpg"> 
      </a-assets> 
      <!-- LEFT HOUSE --> 
      <a-box color="#FFF" width="2" height="2" depth="2" position="0 0 0" rotation="0 0 45" scale="2 0.5 3" src="#texture_1"> 

      <!-- FLOOR --> 
      <a-box material="src: #texture_0; repeat: 50 30" width="200" depth="200" density="40" transparent="true" opacity="0.75" position="0 -6 0"> 

      <!-- SKY --> 
      <a-sky src="#sky"></a-sky> 


      <!-- RIGHT HOUSE --> 
      <!-- <a-box material="src: #texture_2; repeat: 50 30" width="200" depth="200" density="40" transparent="true" opacity="0.75" position="0 -50 0"></a-ocean> --> 

      <a-camera position="100 1.8 100"> 
      <a-cursor color="#2E3A87"></a-cursor> 
      </a-camera> 
     </a-scene> 
    </body> 
</html> 

回答

1

您正在更改他們的位置的Y值,這會使它們上下移動。您可能需要改變Z或X變量。

例如,在「右府」,而不是:position="0 -50 0"你可能想position="0 0 -50"position="-50 0 0"

而且你的右府關閉標籤是</a-ocean>,而不是</a-box>

而且你需要關閉<a-box>左房和樓標籤與<a-box>