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

[XR] onHitTestResultObservable always gives non zero results.length #8887

Closed
ankitcsr opened this issue Sep 7, 2020 · 2 comments
Closed

Comments

@ankitcsr
Copy link

ankitcsr commented Sep 7, 2020

hitTest.onHitTestResultObservable.add((results) => {
if (results.length) {
dot.isVisible = true;
results[0].transformationMatrix.decompose(
dot.scaling,
dot.rotationQuaternion,
dot.position
);
} else {
dot.isVisible = false;
}
});

In above code (taken from hit-test example ) its never going in else part .

In WebXRHitTest.ts.
Its notifying when results.length is non zero.
if (results.length) {
this.onHitTestResultObservable.notifyObservers(results);
}

@sebavan
Copy link
Member

sebavan commented Sep 7, 2020

@RaananW RaananW removed the bug label Sep 7, 2020
@RaananW
Copy link
Member

RaananW commented Sep 7, 2020

Just wanted to add that this is not bug, it's by design.

@RaananW RaananW changed the title [WebXr] onHitTestResultObservable always gives non zero results.length [XR] onHitTestResultObservable always gives non zero results.length Sep 8, 2020
@RaananW RaananW added in progress Someone is currently working on this issue VR/AR/XR labels Sep 8, 2020
@RaananW RaananW removed the in progress Someone is currently working on this issue label Sep 8, 2020
@sebavan sebavan closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants