I can't get my Gear VR touchpad to work - I'm just trying to move the camera position on touch. I've tried both pieces of code below:
public Camera cam;
void Update()
{
if (Input.GetMouseButton (0))
{
cam.transform.position = new Vector3(-100f, -100f, -100f);
}
}
and
void Start ()
{
OVRTouchpad.Create();
OVRTouchpad.TouchHandler += HandleTouchHandler;
}
void HandleTouchHandler (object sender, System.EventArgs e)
{
OVRTouchpad.TouchArgs touchArgs = (OVRTouchpad.TouchArgs)e;
if(touchArgs.TouchType == OVRTouchpad.TouchEvent.SingleTap)
{
cam.transform.position = new Vector3(-100f, -100f, -100f);
}
}
My script is attached to the OVRPlayerController