Clickable Targets

+7 votes
asked Apr 25, 2018 by martindaum (200 points)
edited Apr 25, 2018 by martindaum
Hi!

I would really need the functionality to click on tracked image-targets once they are detected. We have multiple targets on the screen and want to show details for specific targets, which the user should be able to select.

The functionality has to be implemented on iOS and Android.

Please don't just tell me that it is possible, I would really need help how to achieve it using sample code.

Thanks,

Martin

1 Answer

0 votes
answered Apr 26, 2018 by albert52 (31,830 points)
Your requirements are not detailed enough. Do you want to get the location of each ImageTarget relative to the screen?
commented Apr 26, 2018 by martindaum (200 points)
I think my approach would be to get the tap location in touchesBegan in the OpenGL view. Then I would want to go through all tracked image targets, calculate their location relative to the screen and check if the tap was inside the target. So yes, that is what I want to achieve.
commented Sep 3, 2018 by spuerto (120 points)
Hi martindaum,

were you able to solve your problem? I'm also looking for a solution but couldn't find one.
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...