-
Notifications
You must be signed in to change notification settings - Fork 140
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
Examples for hittest? #164
Comments
true, I would like to have a guide/examples section.
returns all objects that have bin hit by the "ray" coming out of the camera at screenpoint typical usecase it to tap/click on objects on the screen, where you give the click position to |
I'm familiar with mostly the react-native or react style of event flow, like It's still not clear to me where I would put Inside of a callback of a ARKit component prop somewhere? Inside The most common cases I could think of know that I would want to know how to handle...
and then being able to use that captured location to then change the location of an asset, or to place a new one, or remove/change the one pressed on |
@elderbas
the demo cube's position being this.state.tapPosition |
Just kidding, that is good if you want to drag things around but
will do for just a hit test |
That is nice, but what if I have 10 objects and I want to know which one I clicked is? I am trying to use hitTestSceneObjects, but the id coming back on the 'results' response is a random ID that changes every time. |
@joseocasioserra
Then, after you do your hit test and have a result, get the type so you can have different kinds of entities and also id
|
The example in documentation with the
Isn't very clear to me how I'm supposed to use hit test.
Could we add that in the example somewhere? Perhaps detecting when a given position is detected on the screen.
The text was updated successfully, but these errors were encountered: