Skip to content

poll: true breaks cardboard button usage #4

@kylebakerio

Description

@kylebakerio

And possibly other stuff too, though I haven't found any other issues yet somehow?

The problem is here:

    play: function () {
        let sceneEl = this.el.sceneEl;
        if (this.data.poll) {
            this.updateControllers({});
            sceneEl.addEventListener('controllersupdated', this.updateControllers);
        } else {
            this.addSessionEventListeners();
            sceneEl.addEventListener('enter-vr', this.addSessionEventListeners);
        }
    },
    

Basically, this.addSessionEventListeners() never gets called--either at initialization, or upon entering VR. So, no listening for select-start and select-end happens, which is how the gaze psuedo-controller reports screen touch.

I've added a manual call to addSessionEventListeners(); and that does indeed make it work on cardboard with the cardboard button, but I don't know if that breaks anything else yet--I'll go test that now. After some more testing, I'll probably offer a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions