Hello, I’m getting all sorts of weird things happen when swiping on the GearVR. I am displaying mouseX/Y on screen and seeing massive variations with what (to me) feels like identical swipe motions (anything from 4.0 to 70.0+). Also, I think I need something in the code to look at which direction has the greatest movement as swiping - even slightly diagonally - produces unexpected results. Is anyone else seeing this? t’s also entirely possible that I am missing something fundamental…
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Player : MonoBehaviour {
public Text gazeText;
public Text swipeText;
public Text tapText;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
var camera = GetComponent<Camera>();
var lookDirection = camera.transform.rotation * Vector3.forward;
gazeText.text = lookDirection.ToString();
if (Input.GetButtonDown("Tap"))
{
tapText.text = "Tap Detected";
}
var mouseX = Input.GetAxis("Mouse X");
if (mouseX > 5.0f)
{
swipeText.text = mouseX + " Swipe Detected on X Axis";
}
var mouseY = Input.GetAxis("Mouse Y");
if (mouseY > 5.0f)
{
swipeText.text = mouseY + " Swipe Detected on Y Axis";
}
}
}