Skip to content

Unable to interact click scene AR #568

@mauricrea

Description

@mauricrea

Hi everyone,
I followed the guide available here: https://hiukim.github.io/mind-ar-js-doc/examples/events-handling/, specifically the section about handling clicks to interact with the AR scene in a web app, such as clicking on a scene element (a-plane, a-image, etc.).

However, in all my tests, the click event is never detected, and I can't understand why. The only thing that works is capturing a generic click anywhere on the phone screen, but not on the actual AR scene elements.

In my setup, I added an a-camera and an a-plane inside the a-scene, just like shown in the guide:


// detect click event
const examplePlane = document.querySelector('#example-plane');
examplePlane.addEventListener("click", event => {
console.log("plane click");
});

But on mobile devices, clicking on the a-plane never triggers the event.
Does anyone know why this happens or how to make it work?

Thank you

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