How do i get 3D itens to stay static in the scene?

61 views Asked by At

I'm trying to develop a web system which uses the smartphone's camera to AR experience.

I would like to let 3D objects static in the scene, but in the tests, the objects keep moving and flicking.

To be more specific, my objects are pipes and they need to be static, so the person can see where they are located "through" the walls.

Here's the sample of the code.

Index.html

<!DOCTYPE html>
<html>
  <head>
    <title>Entity-Component - Registry</title>
    <meta name="description" content="Entity-Component - Registry">
    <script src="https://aframe.io/releases/1.4.0/aframe.min.js"></script>
    <script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>
  </head>

 <body style="margin: 0px; overflow: hidden;">
   <a-scene embedded arjs>
     <a-assets>
       <a-asset-item id="roomOBJ" src="./models/SALA_TATO_2.obj"></a-asset-item>
       <a-asset-item id="roomMLT" src="./models/SALA_TATO_2.mtl"></a-asset-item>
     </a-assets>
     <a-marker preset="hiro">
       <a-entity static-body obj-model="obj: #roomOBJ; mtl: #roomMLT" position="-7 0 -3" rotation="0 0 0"></a-entity>
     </a-marker>
     <a-entity camera look-controls position="0 1.6 -3" rotation="0 50 0"></a-entity>
     </a-scene>
   </body>
</html>

Thanks for the help in advance.

0

There are 0 answers