"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

Problem with Virtual button

I try to change coordinat of virtual button (in file xml on folder assets) . and it work. but when i try to change the coordinat in file VirtualButtons.cpp with same coordinat at file xml, some of my virtual buttons didn't work. and when i try to closer camera to marker one of my virtual button working alone.  i have been to change the sensitivity to high but it didn't work.

 

any idea with my problem?

 

AlessandroB

Thu, 11/15/2012 - 11:58

Hi, not sure to entirely understand the problem,

but a few things to keep in mind:

in the VirtualButton.cpp file, the button coordinates are "reset" with hard-coded values when you call toggleVirtualButton();

masbejo40

Thu, 11/15/2012 - 12:25

So my problem happend when i try to make  same coordinates in VirtualButtons.cpp file and in the XML.

 

before that, i just change coordinates in the XML, and it work but not sensitive.

AlessandroB

Fri, 11/16/2012 - 14:01

Hi, can you paste here the lines of code where you set the VB coordinates ?

(just the relevant lines of code that you have modified, not all the sample code...)

 

AlessandroB

Tue, 11/20/2012 - 12:55

Hi, I tested with your original target image and indeed I was able to reproduce your problem (with some of the buttons not working);

masbejo40

Thu, 11/22/2012 - 07:17

i have been try to change imange size in XML file, and try to change coordinate of virtual button. but it didn't work. and how about problem, when i close camera with marker, and the button work by itself. any idea?

AlessandroB

Thu, 11/22/2012 - 13:58

Hi,

actually for what concerns the XML target size, I only experience the problem when the size is not big enough, so with something around 52 x 68, it should work also for you (maybe you can increase still a bit more, but I was able to have it already good at 51.8 x 67.7); 

masbejo40

Fri, 11/23/2012 - 09:11

sorry, when you change the size of the target, you reupload marker to https://ar.qualcomm.at/projects, or just change the size of the target in the xml file without re-upload it?

AlessandroB

Fri, 11/23/2012 - 09:36

Just manually edit the XML, no need to upload again.

Same for virtual button coords, editing the XML is sufficient (but if you also change the .CPP code, then don't forget to ndk-build and refresh in Eclipse).

 

AlessandroB

Mon, 11/26/2012 - 09:55

For virtual buttons coordinates, what I mean is:

you also need to modify the coordinates in the .CPP file, of course, if your application supports "Toggling" buttons on/off (i.e. like in the VirtualButtons sample, where you have Menu Options to toggle buttons on / off);