By yakobom
on Thu, 08/13/2015 - 12:08
Hi,
I'm using Vuforia 4.2.3 on Android, using C++.
I'm trying to create several Virtual Buttons using the 'toggleVirtualButton' method - but I am only able to create one button. All the rest fail with log message "ImageTarget::createVirtualButton(): Failed to create virtual button."
I made sure the names are not the same, I have tried various rectangle coordinates - but came up with nothing.
Any ideas what could the problem be?
Thanks,
yakobom
Creating several Virtual Buttons dynamically
It may be possible you are defining your buttons outside of your image target.
Creating several Virtual Buttons dynamically
Thank you, but that is not the case. You see, if I change the order of the creation, the first button is always the one that is created and shown. So it seem like it is not a problem of the coordinates...
yakobom
Creating several Virtual Buttons dynamically
Guys, I'm still stuck with this issue - can anyone try to assist?
Thanks,
yakobom
Creating several Virtual Buttons dynamically
Have you checked the sample application provided? Look for method toggleVirtualButton(ImageTarget imageTarget, String name, float left, float top, float right, float bottom) in VirtualButtons.java.
Creating several Virtual Buttons dynamically
Hi,
Thanks for your reply.
Yes, I have checked the sample and as mentioned below I am using 'toggleVirtualButton'. I am rendering my buttons, and I am able to see the first button always - the creation of the second one always fails.
Creating several Virtual Buttons dynamically
Hi,
Yes, you can use the user defined targets for the virtual buttons. It may be that the place where you are creating the button is not feature rich so it won't trigger, or it can be triggering not so reliably.