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

WebXR AR Hit Test #39

Open
De-Panther opened this issue May 16, 2020 · 11 comments
Open

WebXR AR Hit Test #39

De-Panther opened this issue May 16, 2020 · 11 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@De-Panther
Copy link
Owner

The current WebXR API doesn't have implementation of plane/surface detection, but it does have Hit Test.
To make the AR option useful, need to implement this hit test, so users would be able to position objects in the world.

@De-Panther De-Panther added the enhancement New feature or request label May 16, 2020
@marcusx2
Copy link

marcusx2 commented Jul 5, 2020

With an example scene that allows the user to scale, move and rotate the object, please :D. Ideally, to look something like google's scene viewer

@adamsingle
Copy link

adamsingle commented Jan 15, 2021

@rogueyoshi
Copy link
Contributor

Hi, what's the status on this? It's trivial to setup in vanilla JS/WebXR, but have there been any hurdles for the layer in Unity?

@De-Panther
Copy link
Owner Author

@rogueyoshi currently there's Hit-Test with viewer(screen) center only.
#59

It's possible to implement hit test from other points of the screen, but I prefer to wait for Unity to add support for WebGL in the XR SDK, and implement it after that

@rogueyoshi
Copy link
Contributor

@De-Panther well then... will you be PRing this back into the main repo? and do you know when Unity will be making XR SDK bindings?

@De-Panther
Copy link
Owner Author

I have no idea regarding Unity's plans for XR SDK WebGL support.
But once there'll be, I plan to add this to this repo.

If I'll see that it takes them too much time, I'll probably add better support for this specific WebXR API.

Can you describe your use case? (It'll help to design the integration)

@qbytx
Copy link

qbytx commented Mar 30, 2021

Being able to hit test from the center of the screen covers 90% of ordinary use cases, that I can think of. So that's a huge plus.
What it omits for now, is the ability for the user to tap certain areas of the screen, and have hit detection fire from that x/y on events such as ontouchstart, ontouchend, etc - this would be useful for stylizing the ux of certain types of ar games and experiences.

imagine a farming simulator where the player wants to plant seeds in the ground. rather than having them direct the center of the screen to each coordinate where they would like to plant the seed, they simply tap the screen, and the seed is planted.

most actual use cases could be engineered around the limitation of only having centered hit testing, but it might be a less fluid ux experience

@ConorVernon
Copy link

I'm struggling to figure out how to use the hit testing implemented here. The sample scene does not seem to do anything despite having the SceneHitTest code present.

@RayznGames
Copy link

RayznGames commented May 18, 2023

I have been hassling myself with this package, for the last week, and it's not pleasant to work it on AR, information is scarce, and somewhat quickly written. and the info we have is majorly related to VR.

EDIT : ( I lack the knowledge to talk about this system and i didn't want to confuse anyone, that's why I edited this comment) Thanks for making this incredible plugin available to everyone.

@De-Panther
Copy link
Owner Author

Please don't confuse others just because you don't know something.

SceneHitTest works as usual, and if you follow the getting started guide it'll work as it should.
Combining different versions of parts of projects by copy pasting with no understanding how Unity's assets system works, usually break them, as you describe happened to you.

Documentation is lacking, true. If you must have documentation and can't figure out how to work by using the code and samples, this project is not for you.

@RayznGames
Copy link

My apologies I wasn't trying to confuse anyone, I may try to improve my understanding of this. I'm sincerely sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
General
  
To do
Development

No branches or pull requests

7 participants