By masbejo40
on Thu, 11/15/2012 - 07:36
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?
Problem with Virtual button
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();
Problem with Virtual button
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.
Problem with Virtual button
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...)
Problem with Virtual button
this is the coordinate code in virtualbuttons.cpp file
Problem with Virtual button
Hi, I tried your code and XML and it seems to work fine.
However I had to change the ImageTarget size
Problem with Virtual button
i have been PM link of my marker to you. can you help me to identify the problem?
Problem with Virtual button
Hi, I'll check the data you sent me and get back to you.
Problem with Virtual button
Hi, I tested with your original target image and indeed I was able to reproduce your problem (with some of the buttons not working);
Problem with Virtual button
Problem with Virtual button
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);
Problem with Virtual button
Problem with Virtual button
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).
Problem with Virtual button
it is possible to change the coordination only in the XML file? what problems
Problem with Virtual button
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);