# Pointer coordinate on mobile device

**URL:** <https://discourse.threejs.org/t/pointer-coordinate-on-mobile-device/16670>\
**Category:** Questions\
**Tags:** javascript\
**Created:** [June 30, 2020, 7:07am UTC](https://discourse.threejs.org/t/pointer-coordinate-on-mobile-device/16670 "2020-06-30T07:07:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fullofstaff](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fullofstaff](https://discourse.threejs.org/u/fullofstaff)\
**Post date:** [June 30, 2020, 7:07am UTC](https://discourse.threejs.org/t/pointer-coordinate-on-mobile-device/16670/1 "2020-06-30T07:07:50Z")

</div>

hello

how can get the pointer coordinate for use in raycasting ,  
in desktop computer i can get with event and capture the mouse position  
but when i using mobile its undefined

> renderer.domElement.addEventListener( ‘touchstart’,raycaster\_large\_image\_gallery\_process, false );  
> mouse.x = ( e.clientX / window.innerWidth ) \* 2 - 1;  
> mouse.y = - ( e.clientY / window.innerHeight ) \* 2 + 1;

thanks

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 30, 2020, 9:14am UTC](https://discourse.threejs.org/t/pointer-coordinate-on-mobile-device/16670/2 "2020-06-30T09:14:37Z")

</div>

Try it with:

```auto
const clientX = event.touches[0].clientX;
const clientY = event.touches[0].clientY;

```

---

<div class="post-metadata">

**Author:** ![fullofstaff](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fullofstaff](https://discourse.threejs.org/u/fullofstaff)\
**Post date:** [June 30, 2020, 9:25am UTC](https://discourse.threejs.org/t/pointer-coordinate-on-mobile-device/16670/3 "2020-06-30T09:25:28Z")

</div>

> [@Mugen87](#):
>
> `event.touches[0]`

thanks, works great
