"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Get Trackable Angle

Hi, I would like to change the position of some textview I've put over the camera view dynamically with the position of the trackable in it. However, I can't find any method in Vuforia API which provide me the ange of the trackable. I try to get the top-left corner and top-right coordinates to work out by myself, but I couldn't find. Can you help me? Thanks for any help, Cesar.

Here's some code to get the four corners of the trackable in screen coordinates: [CODE] const QCAR::ImageTarget* imageTarget = static_cast(trackable); QCAR::Vec2F targetSize = imageTarget->getSize(); float halfWidth = targetSize.data[0] / 2.0f; float halfHeight = targetSiz

Hi again. I'd been having troubles with this part. With the code you gave me I was able to positioned my TexViews on the coordinates only if I was watching the trackable just from the front, if I move the position were they appear were wrong.

I'm not sure what you're trying to do with the angle and width and height here. Have you tried passing up the four corners to Java and rendering something at each corner to verify that that much is correct?

I want to put some textviews in diferent position of the trackable, no the screen. For example, in a photo of me and my friends, which I convert to trackable, I want to add our names just in our faces with previous coordinates I gave in a file, not recognizing our faces.

Ok, I think I've fixed the position problem. I've made another algorithm more complex. I will ask again if I cna't fix the other one, refreshing one. Thank, Cesar

OnBoardPibs

Wed, 12/12/2012 - 07:31

Kim! I just would like to thank you for this post. I've been looking for days (ToT) on how to get the coordinates of the four corners of the trackable. Your other posts have helped me greatly in the past as well, so I would just like to express my gratitude via this short post.