Start a new topic

Clicking on Instant Target

 Hi!


I'm wondering if it is possible to detect clicks on Instant Targets.

I'm working with Unity and trying out the sample-application you provided but haven't found a possibility yet.


Best regards!


Hi Peter,


We don’t offer any APIs to detect clicks, but if the augmentations have colliders on them, it is possible to do a Physics.Raycast call (https://docs.unity3d.com/ScriptReference/Physics.Raycast.html) to check if a ray is intersecting one of the colliders. A ray can be generated from the touch position using the Camera.ScreenPointToRay method (https://docs.unity3d.com/ScriptReference/Camera.ScreenPointToRay.html).


Thanks

Eva

Hey Eva,


thanks for the answer, but wouldn't it theoretically be possible to simulate a click with Dragging and the amount of time that is passing whilst the user is doing so?

My problem is that I haven't quite understood how the SDK interacts with the user. Can you give me a hint on the files I need to have a look at or if it basically is not possible to get the begin and ending times of a dragging interaction?

Hi, 


The Instant Tracking sample handles user input such as dragging. Specifically, the MoveController.cs script handles dragging the furniture around. Please let me know if you have any additional questions.


Best regards,

Alexandru

Login or Signup to post a comment