Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arSystem.pause(true) -> targetLost not calling #546

Open
geekz-reno opened this issue Sep 20, 2024 · 1 comment
Open

arSystem.pause(true) -> targetLost not calling #546

geekz-reno opened this issue Sep 20, 2024 · 1 comment

Comments

@geekz-reno
Copy link

On pause result was find, the camera still going and stop scanning, but targetLost event never calling. If i remove the pause function, both are calling perfectly.

const modelTarget = document.querySelector("#my-ar");
  modelTarget.addEventListener("targetFound", (event) => {
      console.log("TARGET FOUND");
      arSystem.pause(true); // pause AR, keep video
  });

  modelTarget.addEventListener("targetLost", (event) => {
    console.log("TARGET LOST");
    arSystem.unpause(); // unpause AR and video
  });
@Kikuich
Copy link

Kikuich commented Sep 23, 2024

I think that's what the arSystem.pause() does. Since it's paused, it's not going to detect if a target was lost because it's not actively detecting anything at the moment.

What are you trying to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants