Start a new topic

add tap event on 3d model

add tap event on 3d model


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.

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.
Login or Signup to post a comment