# Mobile Device - x and y coordinates for finger touch

**URL:** <https://discourse.processing.org/t/mobile-device-x-and-y-coordinates-for-finger-touch/18744>\
**Category:** Processing for Android\
**Created:** [March 17, 2020, 7:05pm UTC](https://discourse.processing.org/t/mobile-device-x-and-y-coordinates-for-finger-touch/18744 "2020-03-17T19:05:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brooksofmaine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/brooksofmaine/32/8424_2.png) [@brooksofmaine](https://discourse.processing.org/u/brooksofmaine)\
**Post date:** [March 17, 2020, 7:05pm UTC](https://discourse.processing.org/t/mobile-device-x-and-y-coordinates-for-finger-touch/18744/1 "2020-03-17T19:05:48Z")

</div>

When a user touches a screen on a mobile device, how do I find out the coordinates of the user’s touch? I’d like to reposition an image based on the touch location on the screen.

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [March 17, 2020, 8:01pm UTC](https://discourse.processing.org/t/mobile-device-x-and-y-coordinates-for-finger-touch/18744/2 "2020-03-17T20:01:30Z")

</div>

Hi,  
Those would be the same `mouseX` and `mouseY`

---

<div class="post-metadata">

**Author:** ![brooksofmaine](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/brooksofmaine/32/8424_2.png) [@brooksofmaine](https://discourse.processing.org/u/brooksofmaine)\
**Post date:** [March 18, 2020, 1:13pm UTC](https://discourse.processing.org/t/mobile-device-x-and-y-coordinates-for-finger-touch/18744/3 "2020-03-18T13:13:01Z")

</div>

Thank you, LuckSmith… seems to work fine. Here’s the working code, thanks to you:

[https://editor.p5js.org/brooksofmaine/sketches/9QMC9ID8](https://editor.p5js.org/brooksofmaine/sketches/9QMC9ID8)

Best…Malcolm
