Touch event - radius? (SOLVED)

On a touch screen device when the user interacts by tapping the screen is it possible to determine the X/Y radii of the contact point - as one can do in HTML5/JS?

I don’t think so. How does that work in JavaScript? Can you share a link to an API?

Check out the MDN docs here. It does come with the warning that this is experimental. However, I have been using it on my Android devices for at least the past two years.

Interesting. Is this something supported on Android and iOS?

Yes - all that the browsers do is access the relevant API.

**Android: ** https://developer.android.com/reference/android/view/MotionEvent
**iOS: ** https://developer.apple.com/documentation/uikit/uitouch

There are minor variations in terminology. Android refers to Axis Major/Axis Minor while iOS thinks in terms of Major Radius/Minor Radius. In both cases the touch point is an ellipse

Ok, got it. I don’t recall anyone asking for this in the past. Please open a feature request ticket here: https://github.com/defold/defold/issues/new/choose

1 Like

There you go - the ticket has been created :crossed_fingers:

Thanks. Obtaining contact area ellipse radii on touch screen tap events · Issue #4923 · defold/defold · GitHub