(I came across this issue while looking at possible solutions to my other question: http://answers.unity3d.com/questions/26037/how-do-i-prevent-deal-with-input-lag-on-a-touch-interface).
Does anyone have any information on what the value in Touch.deltaTime is supposed to be? The documentation only says:
Amount of time passed since last change
But I can't figure out how this relates to Time.deltaTime. In my app, I often (but not always) get the touch deltaTimes to be zero while swiping, but non-zero Time.deltaTime. It almost looks like the touches are updated more often than Update is called...if this is the case, is there any way to get touch data in between?
Edit: I get similar results in FixedUpdate - touch.time is usually 0 or 0.012 (fixedDeltaTime = 0.02). Looking at deltaPosition, it looks like the touch data is the same for 4 fixedUpdate frames (I only looked at a sample, so I cannot tell whether it is exactly always 4 frames), which does not really make sense to me.
Another strange thing, while swiping at a moderate speed, deltaPosition.magnitude gets quite big (190). If this is the pixels travelled in 0.08s, then the finger moves at ~2400 pixels per second (which is much faster than I would expect).
Is it not possible that the touch update(change) was called right before Update and therefore the Touch.deltaTime is always 0 in Update? Is it always 0 in FixedUpdate as well? If change is what I interpret the word to mean, then capturing the Touch data more frequently will not really answer your first question though (More on this in your first question).
– anon16733337@skovacs1 It could be, I'll do some more tests. I thought I could use the information for more accurate prediction, something like predictedPos = realPos + touch.deltaPosition / touch.deltaTime * Time.deltaTime or some version thereof.
– Herman-Tulleken