A-frame daydream control?

Just started playing with A-Frame, and I can see the vive and oculus-touch-controls, but nothing for google daydream.

I went through the component repository and see nothing like it will do the job. The closest thing to research now is the Gamepad API, but I am amazed that I cannot find anything.

I have a Pixel XL and daydream, and I would like to turn on the controller, and not just control my head and look at the controls. Can someone point me in the right direction, please.

thank

UPDATE . I have a Daydream controller that works on clicks! Launching a 360-picture gallery ( https://aframe.io/examples/showcase/360-image-gallery/ ) takes clicks from the Daydream controller. Probably, perhaps this was timed to coincide with my previous attempts, or I did not pair it correctly! I will continue to play!

+4
source share
3 answers

Work on setting up remote Daydream in an Aframe project. There are no downblock components yet, but I hope to finish them soon - and it looks like they are going to support support in the upcoming Aframe release.

But you cannot handle roll support.

-, , :

, Aframe v0.4 WebVR. Daydream ( .) , , , , t .

-, , WebVR, API- Gamepad -. , .

    window.addEventListener('gamepadconnected', function(evt) {
      console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.",
        e.gamepad.index, e.gamepad.id,
        e.gamepad.buttons.length, e.gamepad.axes.length);
    });

-, , , , Gamepad. requestAnimationFrame. : https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API

, . , !


EDIT: , . "Daydream Controller" : tracked-controls="id: Daydream Controller".


Daydream. - .

    { 
      axes: [0, 1],
      buttons: [{
        pressed: false,
        touched: false,
        value: 0
      }],
      connected: true,
      displayId: 16,
      hand: "left",
      id: "Daydream Controller",
      index: 0,
      mapping: "",
      pose: {
        angularAcceleration: null,
        angularVelocity: [0, 0, 0],
        hasOrientation: true,
        hasPosition: false,
        linearAcceleration: [0,0,0],
        orientation: [0,0,0,1],
        position: null
      },
      timestamp: 1234567890123
    }
+5

- , ...

A-Frame 0.4.0 tracked-controls:

, '', ... -

<a-entity tracked-controls="id:"></a-entity>

, ..?

+1

Source: https://habr.com/ru/post/1665123/


All Articles