Start a new topic

I want to find the position value of the marker (target image).

I am using the Wikitude SDK iOS 8.5.0.


I want to find the position value of the marker.


My expected behavior of wikitude is

The position x, y, z value changes when the marker is moved.


So I coded to output the translate and of Drawable Class (ImageDrawable or HtmlDrawable)

I put the Drawable into the ImageTrackable, traced the marker, moved the marker and printed the value,

The results were all (0,0,0).


How can I find out the changing coordinate values of a marker?


the translate properties are input properties, they allow you to change the position of your augmentation within the image target coordinate system. If you did not change them explicitly (0,0,0) is the expected value.

The JavaScript SDK does not support getting the underlying pose matrix, which is what you'd like to query if I understand correctly. For that you will have to use the native SDK(s). They provide the complete pose, which you can simply extract the translation from.

May I ask what you intend to do with these position values? There's very little you can do with that information within the JavaScript SDK, which is why we do not provide it.

- Daniel

Thanks for your response.

I am trying to move an object of three.js.

I want to precisely positioning and manipulate this mesh at the position of the ImageTarget.

(+ Is it possible to embed a scene? like artoolkitjs)

So, is wikitude native sdk able to get transform information of ImageTarget (ex> 4 * 4 matrix)?


I see. I'm afraid we simply don't expose the pose in the JavaScript SDK directly. You could implement and add a plugin, which allows you to get the matrix in C++. You could then either render you custom augmentations in OpenGL ES from within the plugin or, if you have to have three.js, pass the matrix from the C++ plugin to JavaScript. Our plugin API should allow you to do that by adding a JavaScriptPluginModule. I encourage you to have a look at the plugins samples of our sample app if you intent to go down that route.

The native SDK does give you the 4x4 transformation matrix, but you're going to have a very difficult time combining that with three.js. Our native SDKs do offer APIs in the language native to each platform, meaning either Java, Objc, C++ for Android, iOS and Windows respectively and are not meant to be used in combination with JavaScript.

- Daniel

Thank you very much for your kind reply!

Thanks to this, I can think of the coding direction.

Login or Signup to post a comment