By wisien92
on Sun, 05/25/2014 - 19:37
Hi i just recently started using Vuforia sdk and i have difficulties making virtual buttons ...i must say at the beggining that i tryed the sample app and well did not understand it ;/
here is what i did:i added virtual button to the scene as a child of image targer then added plane as a child of virtual button so i can see it . Then i have written simple script to manage button actions and added that script to image targer.
public class ManageButtons : MonoBehaviour, IVirtualButtonEventHandler { // Use this for initialization void Start () { VirtualButtonBehaviour[] vbs = GetComponentsInChildren<VirtualButtonBehaviour>(); foreach (VirtualButtonBehaviour item in vbs) { item.RegisterEventHandler(this); } } // Update is called once per frame void Update () { } public void OnButtonPressed(VirtualButtonAbstractBehaviour vb) { Debug.Log("Helllllloooooooooo"); } public void OnButtonReleased(VirtualButtonAbstractBehaviour vb) { Debug.Log("Goooooodbyeeee"); } }
and it's not working ;/ can anyone indicate me to a solution
Virtual Button problem
Hey there,
I recently did some playing with Virtual Buttons myself.
This is the script that I got working for my Next and Back buttons.
Virtual Button problem
I have sensivity set to High. The button is not visible ... is it normal?
Virtual Button problem
I'm not sure exactly what you mean by "visible". But I believe the VirtualButtonPreviewMaterial (light blue by default) should be visible to your AR Camera.
Virtual Button problem
By not visible i mean that i can't see it when testing. It's visible in editor but when i test it with camera i cant see it. I'll try to tweak the settings and position maybe it will help
I cant't chande thy Y position of button
Virtual Button problem
I don't see my Virtual Buttons in Play mode either. I think that is the default setup.
This page: https://developer.vuforia.com/resources/dev-guide/virtual-buttons
Virtual Button problem
Well i can't figure out why it's not working. But it's not essensial for my project, just wanted to check out how it works
Virtual Button problem
Virutal buttons are not visible by default in Play Mode.
The reason you see an outline around the Virtual Buttons in the example is because there was code written to implement that.
See the VirtualButtonsUIEventHandler.cs