Start a new topic
Solved

How could I get x, y and z coordinates of a QR code relative to my camera?

I am trying to create a way to have inside out tracking on my google cardboard and I was wondering if there was a way to get the relative position of an image in x, y, and z. My goal is to put a QR code on a controller, track it using Wikitude, and then display it with a-frame.  


I know there is a way to get distance from the camera, so all I would need is where the QR code would be displayed on screen or the rotation of my phone relative to the code then I could use math to find its location, is there a way to do this?


I am going to be using phoneGap/cordova and a iPhone 6


1 person has this problem
1 Comment

Good morning,



you cannot get the position of an image target using the JavaScript SDK or any of its extensions, for that you would need to use our native SDKs. But from what I understand from your description, you don't need to access the position directly. If all you would like to do is display something at the position of your marker, the JS SDK does all of that for you.


It's as simple as creating an ImageTrackable and attaching a Drawable to it; the rest happens internally.


If I misunderstood your use case and you actually do require access to the pose, you'll need to use the native SDKs.



- Daniel


Login or Signup to post a comment