"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

adding virtual buttons

Hi: I modify the xml of imagetarjet. I insert a textureFilenames i give name the buttons enum tagButtons { BUTTON_1 = 1, BUTTON_2 = 1 << 1, BUTTON_3 = 1 << 2, BUTTON_4 = 1 << 3, BUTTON_5 = 1 << 4, NUM_BUTTONS = 5 }; ¿I need anything else? Thank you. Sorry for my english.

ruben0909

Thu, 03/08/2012 - 15:42

I get EXC_BAD_ACCESS The error is in this line // Iterate through this target's virtual buttons: for (int i = 0; i < target->getNumVirtualButtons(); ++i) { target->getNumVirtualButtons() has value"5" . I dont understand nothing I don´t need toggle buttons, only show 5 . Tahnk you

Hi Ruben, I reproduced your mistake I believe - I made all the obvious changes and got the same crash. But it turned out to simply be the length of the vbVertices array in renderFrameQCAR which is hard coded to 24 * 4 = 96.