"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

Virtual Buttons

Hello Community,

 

im desperate and thats why im posting here. I followed several tutorials but i didn't get any solution and thats why im here now

 

I use the Vuforia Framework and Im trying to implement a virtual button to rotate my 3D Model.

After putting the Virtual Button, which is a child of my image target, above the image target, i don't get "button pressed" in the console, when i "hit" the button

in play mode. I renamed the virtual button to RotateZombieButton. 

 

Is this enough information or do i need to provide more information?

 

thanks in advance!

 


using System.Collections;using System.Collections.Generic;using UnityEngine;using Vuforia;public class VBScript : MonoBehaviour, IVirtualButtonEventHandler {private GameObject VBButtonObject;void Start () {  VBButtonObject = GameObject.Find ("RotateZombieButton");  VBButtonObject.GetComponent<VirtualButtonAbstractBehaviour> ().RegisterEventHandler (this);}// Update is called once per framepublic void OnButtonPressed (VirtualButtonAbstractBehaviour vb) {  Debug.Log ("Button pressed");}public void OnButtonReleased (VirtualButtonAbstractBehaviour vb) {  Debug.Log ("Button released");}}

 

 

Hello denyscarlino,

The sample project contains a scene demonstrating the use of virtual buttons. You can get the sample on the Unity Asset Store or on our webpage: https://developer.vuforia.com/downloads/samples

Thanks,

-Vuforia Support

denyscarlino

Thu, 07/13/2017 - 08:51

 Type your code in the box. To create a new line within the box use SHIFT + ENTER. Hello,

 

this doesn't help me!

 

Please is there somebody to help me i google all day every day to fix this but no help

 

So this is my code: