-
Notifications
You must be signed in to change notification settings - Fork 40
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
onClick Not working on Mesh #22
Comments
Alright, i see. The video element receives the clicks instead of the canvas objects. I'll fix that. |
Fixed in |
Thank you for the fast update. I'm not seeing it work though. I see what
you meant by adding the "pointer events none". But I still do not see the
event click happen on my mesh.
Can you add an onClick to the box mesh in your sample and have it just
window.alert? I'm trying to do exactly that but no alert shows.
Thanks again for your great work.
…On Thu, Jul 28, 2022 at 6:51 AM jens ***@***.***> wrote:
Closed #22 <#22> as
completed.
—
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AY5SFN3YCVKF75AH6YLPMKLVWJQ4XANCNFSM54XD52RA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Okay, think it's generally working https://codesandbox.io/s/determined-smoke-eo3jbn?file=/src/index.js ..but I recognize that some clicks are not handled, maybe some frames missing the tracking. Could you try the example, maybe it's working good enough for your usecase? |
I see there's still a problem on mobile devices. Works well on desktop in my case. Reopening.. |
There's a problem concerning portrait view. Ar.js generates a css margin-left which is taken into account in the r3f event system. I think the solution should be this PR |
I see, thanks for keeping up with this. Looking forward to the merge. |
I am running into this problem as well, mesh click handlers are not fired. |
Should be fixed in react-three-arjs/src/ar/ar.jsx Line 96 in d821c16
Updated example -> https://codesandbox.io/s/jolly-hodgkin-ssu33 |
I am trying to fire an onClick function on a cube mesh that is a child of a Marker.
I get no errors but the function never fires on click.
Is this an issue or am I missing something?
Thanks
The text was updated successfully, but these errors were encountered: