I'm trying to detect a tap on mobile devices when a trackable object appears when looking at a tracker. I tried to implement the Unity event system with IPointerClickHandler and then implementing OnPointerClick inside the SurferBehavior class. I attached a physics raycaster to the WikitudeSceneCamera object and I added a trigger box collider to the tracker object. Somehow I don't get the click event triggered and was wondering if there's something in the Wikitude setup that somehow prevents the tap to go through. Thanks for letting me know.
Robin Di Capua
almost 7 years ago
ok I found the solution, I'll post it here in case someone needs it. Basically you need to set the depth of the camera in WikitudeSceneCamera to 0 (or just higher than the one in WikitudeCanvasCamera) and also add a Physics Raycaster to the object.