I have a HP2310 touchscreen and an orbit script. When i use the mouse works perfect, but when i use the finger it doesn’t.
function LateUpdate () {
x += Input.GetAxis("Mouse X") * xSpeed *0.02; //x rotation
gameObject.Find("testMouse").guiText.text = Input.GetAxis("Mouse X").ToString();
y -= Input.GetAxis("Mouse Y") * ySpeed *0.02; //y rotation
gameObject.Find("testMouse2").guiText.text = Input.GetAxis("MouseY").ToString();
y = ClampAngle(y, yMinLimit, yMaxLimit);
var rotation = Quaternion.Euler(y, x, 0);
var position = rotation * Vector3(0.0, 0.0, -distance)+ target.position;
transform.rotation = rotation;
transform.position = position;
}
I uses 2 gui text to print the mouse position when i run the project in standalone mode. The results : when using the mouse it prints values beetween -1 and 1 but with finger nothing is printed.
I’ve notice that the touch reacts to the OnMouseEnter event. How can i modify this to check is mouse entered my object?
Ideas ?