- Home /
Question by
Reapa · Sep 03, 2015 at 05:06 AM ·
touchtouchscreentouches
Understanding UnityEngine.Input.touches
Given the following inside "void Update()":
Debug.Log("////START TOUCHLOG////");
foreach (var touch in UnityEngine.Input.touches)
{
Debug.Log("T" + touch.fingerId + ": " + touch.phase + ", " + touch.position);
}
Debug.Log("////END TOUCHLOG////");
Using 3 of my fingers not touching close, to:
Touch first finger
Touch second finger elsewhere
Touch third finger elsewhere
Repeatably tap first and second finger on the same spot.
Can someone explain why these loggings occur:
A) Same touch ID appears twice?
////START TOUCHLOG////
T1: Ended, (624.0, 256.0)
T1: Began, (624.0, 256.0)
////END TOUCHLOG////
////START TOUCHLOG////
T2: Moved, (530.0, 776.0)
////END TOUCHLOG////
B) No "end" event for T1. T2 becomes T1 next frame.
////START TOUCHLOG////
T0: Moved, (425.0, 766.0)
T1: Began, (508.0, 323.0)
T2: Ended, (912.0, 256.0)
////END TOUCHLOG////
////START TOUCHLOG////
T0: Moved, (425.0, 766.0)
T1: Began, (912.0, 256.0)
////END TOUCHLOG////
This issue occurs when building to WebGL and running on Windows 8 in chrome using the touch screen.
This issue does not occur when building to Windows and running on Windows 8 using the touch screen.
Comment