Search Unity

Changes to Touch.Pressure? Causing issues.

Discussion in 'iOS and tvOS' started by SimonOliver, Oct 24, 2017.

  1. SimonOliver

    SimonOliver

    Joined:
    Jul 16, 2007
    Posts:
    30
    Hi,

    Have some changes been made to the way that Touch.Pressure is reported on iOS? It means that it is impossible to determine force touch usage across devices.

    On force touch devices (eg iPhone 6S):
    • Input.touchPressureSupported reports true
    • Touch.MaxPressure reports correct value for touches
    • Touch.Pressure reports correct value for touches
    On non-force-touch devices that support stylus (eg iPad Pro 10.5)
    • Input.touchPressureSupported reports true (even though the screen does not support touch pressure, only stylus)
    • Touch.MaxPressure always reports 1
    • Touch.Pressure always reports 1 (same as max)
    This means that its currently impossible to correctly detect force touch behaviour on iOS devices, as non-force touch devices are reporting pressure sensitivity with full touch pressure, indicating a hard press. I believe this used to be reported as 0 with max pressure 1 (which would be correct as it is not a hard press).

    If so, could this be moved back to the previous behaviour with 0 touch pressure?
     
  2. SimonOliver

    SimonOliver

    Joined:
    Jul 16, 2007
    Posts:
    30
    This has changed somewhere between 5.6.1p1 and 5.6.3p4

    Actually - looking again, maybe non-force-touch platforms have started reporting Input.touchPressureSupported when they previously didn't?
     
    Last edited: Oct 24, 2017
  3. SimonOliver

    SimonOliver

    Joined:
    Jul 16, 2007
    Posts:
    30
    Ok reported as Case 962417.

    This is definitely a case of Input.touchPressureSupported reporting the wrong value, reporting Force touch support on non-force touch devices (such as iPad Pro 10.5).

    Looks like this is probably a regression from #834172 as it was changed recently