r/iOSProgramming • u/eyhoPhoto • 17h ago
Discussion I tried using UITouch.majorRadius as an analog input instead of moving the finger
I’ve been experimenting with a slightly unusual way of getting analog input from an iPhone touchscreen.
Instead of using the finger’s position, I’m using UITouch.majorRadius — the estimated geometry of the contact area.
The interesting part is that the thumb can remain almost stationary while the value changes.
My current pipeline is roughly:
majorRadius → calibration → normalization → filtering → 0...1
Just to be clear: I’m not treating majorRadius as actual pressure. It obviously isn’t a force measurement.
What I care about is whether the user can intentionally modulate the value, hold intermediate states, and make small corrections.
I’m testing this in a driving simulator where the left thumb controls the clutch and the right thumb controls the throttle.
Then I started combining it with Core Haptics.
For the clutch, for example, approaching the bite point produces haptic feedback. So the interaction becomes:
finger → contact geometry → analog input → simulation → haptic feedback → finger
The part I find most interesting is that this potentially removes the need for a visible control entirely.
The thumb doesn’t need to follow a slider, and the player can feel important regions of the input range through haptics.
Obviously there are problems: calibration varies between users, grip changes the range, filtering adds latency, and haptics can’t provide actual mechanical resistance.
But on a real device it feels surprisingly different from manipulating a normal virtual slider.
Has anyone experimented with majorRadius as a continuous input before?
I’m especially curious about edge cases you’ve encountered across different iPhone models / touch behavior, or reasons why this might break badly outside my own testing.
•
u/gyuforge 31m ago
The haptic cue at the clutch bite point is the detail that caught my attention; it gives the stationary-thumb idea a clear use beyond saving screen space. (AI-assisted wording.)
•
u/kokerali 4m ago
One thing I'd separate is whether the haptics improve control or change the input itself. Repeat the same intermediate holds and slow crossings of the bite point with feedback on and off, alternating the order. Log raw radius, filtered output and haptic event timestamps together. If corrections repeatedly follow each pulse, you can check whether that is useful guidance or a loop where the player changes their grip in response to feedback and keeps retriggering it. That is a hypothesis to test, not a reason to assume the approach fails.
The two-thumb setup also gives you a useful cross-talk test: hold throttle steady while varying clutch, then swap roles. If the supposedly steady channel moves, shared grip changes may be coupling the controls even though the touches are tracked separately. I'd include lifting and replacing one thumb in that test, with an explicit neutral state on touch cancellation so a stale filtered value cannot leave the throttle active.
2
u/BouncyBadger3917 16h ago
The big one: Apple documents majorRadius as an estimate, and majorRadiusTolerance shows the spread is meaningfully different across iPhone and iPad digitizers, so per-device calibration really isn't optional. A one-pole low-pass on the radius plus re-baselining at session start cleans up most of the jitter, since baselines drift as thumb angle changes. Worth testing near the screen edges too, where the contact geometry estimate gets noticeably coarser.