Search code examples
javascriptaframewebvrhtc-vive

teleport-controls doesn't work under Aframe 0.8.2 in VR mode


There is problem by using the teleport-controls under aframe 0.8.2. In VR mode with Vive there is only the curve shown after touching the trackpad of Vive controller. But the position of camera is not moved. In flat mode, the curve is shown and the position of camera is moved.

https://glitch.com/edit/#!/join/21f0cfd9-2fa0-49f3-910b-aedb91df3d3b

<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-entity id="left-hand"
    vive-controls="hand: left"
    teleport-controls
  >
  </a-entity>

  <a-entity id="right-hand"
    vive-controls="hand: right"
    teleport-controls
  >
  </a-entity>

Maybe has someone idea about it?


Solution

  • I would use it with the camera rig to group hands and head together as suggested in the documentation.

    <a-entity id="cameraRig">
      <!-- camera -->
      <a-entity id="head" camera wasd-controls look-controls></a-entity>
      <!-- hand controls -->
      <a-entity id="left-hand" teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head;"></a-entity>
      <a-entity id="right-hand" teleport-controls="cameraRig: #cameraRig; teleportOrigin: #head;"></a-entity>
    </a-entity>