Start a new topic

Distance between target object and egde of view/screen in px

Distance between target object and egde of view/screen in px


Hello.

I need to calculate distance between recognized target (WTImageTarget) and edge of screen in px. Is that possible? How can I do that?

This feature does not come out of the box in JS or Native SDK but please have a look at the native ClientRecognition samples. You can use the recognizedTarget data to calculate the distance to the display-edges. Note that this approach only helps if you are using native SDK or implement your own Wikitude plugin

Best regards
Login or Signup to post a comment