Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.3.0
Issue ID
ISXB-108
Regression
No
iOS and MacOS Touch event deltas returning wrong values (new Input System)
On OSX with Touch emulation enabled and iOS, Touch events are coming through with bogus delta values. The raw input coordinates are correct, but code in Finger.OnTouchRecorded mucks with the delta value in a way that I don't understand. It seems to assume that Touchscreen is sending a full accumulated delta, but that doesn't seem to be the case.
Here's a log of the values at various steps along the way (on OSX). "Raw Input" is the result of the raw IOCTL for the mouse. "SIM MOVED" is the touch simulation about to record a touch moved. "Finger" is logging in the Finger code just before the delta is mucked with. and "onFingerMoved" is what an onFingerMoved event sees.
I am moving the mouse 100% horizontally, in the positive direction (can see that from the raw values). But there are multiple negative deltas being reported incorrectly, and lots of zero deltas.
If I comment out the "touchState->delta -= previousTouchState->delta;" line, everything works correctly on both iOS and OSX.
Raw Input 1296 440
SIM MOVED: 0 old: (1295.00, 440.00) new: (1296.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 7): accumDelta: (1.00, 0.00) prevDelta: (0.00, 0.00) curDelta: (1.00, 0.00) result: (1.00, 0.00)
onFingerMove: 1 -- delta (1.00, 0.00) (0.01, 0.00)
Raw Input 1297 440
SIM MOVED: 0 old: (1296.00, 440.00) new: (1297.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 8): accumDelta: (1.00, 0.00) prevDelta: (1.00, 0.00) curDelta: (1.00, 0.00) result: (0.00, 0.00)
onFingerMove: 1 -- delta (0.00, 0.00) (0.00, 0.00)
^^^ wrong delta -- should be +1
Raw Input 1299 440
SIM MOVED: 0 old: (1297.00, 440.00) new: (1299.00, 440.00) delta: (2.00, 0.00)
Finger (prevrecord 9): accumDelta: (2.00, 0.00) prevDelta: (0.00, 0.00) curDelta: (2.00, 0.00) result: (2.00, 0.00)
onFingerMove: 1 -- delta (2.00, 0.00) (0.01, 0.00)
Raw Input 1300 440
SIM MOVED: 0 old: (1299.00, 440.00) new: (1300.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 10): accumDelta: (1.00, 0.00) prevDelta: (2.00, 0.00) curDelta: (1.00, 0.00) result: (-1.00, 0.00)
onFingerMove: 1 -- delta (-1.00, 0.00) (-0.01, 0.00)
>>>>> ^^^^ wrong -1 delta
Raw Input 1301 440
SIM MOVED: 0 old: (1300.00, 440.00) new: (1301.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 11): accumDelta: (1.00, 0.00) prevDelta: (-1.00, 0.00) curDelta: (1.00, 0.00) result: (2.00, 0.00)
onFingerMove: 1 -- delta (2.00, 0.00) (0.01, 0.00)
^^^^ wrong delta, should be +1
Raw Input 1302 440
SIM MOVED: 0 old: (1301.00, 440.00) new: (1302.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 12): accumDelta: (1.00, 0.00) prevDelta: (2.00, 0.00) curDelta: (1.00, 0.00) result: (-1.00, 0.00)
onFingerMove: 1 -- delta (-1.00, 0.00) (-0.01, 0.00)
>>>>> ^^^^ wrong -1 delta
Raw Input 1303 440
SIM MOVED: 0 old: (1302.00, 440.00) new: (1303.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 13): accumDelta: (1.00, 0.00) prevDelta: (-1.00, 0.00) curDelta: (1.00, 0.00) result: (2.00, 0.00)
onFingerMove: 1 -- delta (2.00, 0.00) (0.01, 0.00)
^^^^ wrong delta, should be +1
Raw Input 1304 440
SIM MOVED: 0 old: (1303.00, 440.00) new: (1304.00, 440.00) delta: (1.00, 0.00)
Finger (prevrecord 14): accumDelta: (1.00, 0.00) prevDelta: (2.00, 0.00) curDelta: (1.00, 0.00) result: (-1.00, 0.00)
onFingerMove: 1 -- delta (-1.00, 0.00) (-0.01, 0.00)
>>>>> ^^^^ wrong -1 delta
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "GetPreferedValue" returns max value when using auto-sizing
- UI Builder doesn't update the style sheet when using "Extract inline style" right-click option
- “Assertion failed on expression” errors thrown when undoing Nodes creation with keyboard shortcut
- Crash on various stack traces when using Texture2D.CreateExternalTexture() while rendering
- Clicking on section text in Node Library > Context folder throws NullReferenceException errors
Resolution Note:
Closing after discussion with Vlad as we lack a reproduction project and don't seem to have other customers highlighting the issue.