Log in or register to post comments

How to keep object in VirtualButtons

June 29, 2013 - 11:18pm #1

Hello, I'm sorry to my English is not good.


I'm working on a VirtualButtons project, and I have a question.

You know,  when your finger is in a button area(rectangle), the object color is changing,

but when your finger dissappear from the button area, the object is back to the original color.


I want to keep the color of the object even when the button is not triggered.

(At first, the object color is yellow,

next, you trigger the button 'blue', the object color become blue,

and keep blue color if you don't trigger any buttons.

and if you trigger 'green' button, the object color become green and keep this.)


I serched this forum but I couldn't find topics about this.

Do you have any idea?


How to keep object in VirtualButtons

June 29, 2013 - 11:45pm #2


the sample code determines whether a virtual button is "pressed" or not via this line:


in the renderFrame() function of the VirtualButtons.cpp.

This is where you need to change the code to implement your deisred custom behaviour; the specific behaviour you want to achieve is just application logic, and the only relevant API invovled from Vuforia is the isPressed() method mentioned above), so it is entirely up to you how you want to implement it.


Log in or register to post comments