Detect Touch Radius?
Hi, is it possible to detect the radius of the touch on iOS ?
Not currently. The #touch events are simple positions and type. You'd like the radius of the "finger blob"?
I could imagine sending additional context info such as touch radius with the #touch if a control message is sent to #pdparty requesting it. This way the default would keep the old type so as not to break any existing projects which use [unpack] to parse the received messages.
Something like:
[touch extra 1<
|
[s #pdparty]
To turn on extra info for #touch events.
Latest commit adds radius and force to the #touch message:
[r #touch] eventType id x y radius force: multitouch event
- eventType: symbol "down", "xy" (move), or "up"
- id: persistent touch id
- x: x position, normalized 0-1 except for RjDj scenes which use 0-320
- y: y position, normalized 0-1 except for RjDj scenes which use 0-320
- radius: finger/stylus radius in points (pixels)
- force: force into screen, normalized 0-1
This shouldn't break anything as [unpack] silently drops extra list items.
This feature is in the PdParty 1.3.0 beta6 build and now needs to be enabled. Send #pdparty touch extended 1 when the patch is loaded.
You can the it out by joining the 1.3.0 beta until I can make a proper release. Install the free TestFlight app on your iDevice, then open this TestFlight link:
https://testflight.apple.com/join/17ZZ5AC7