# Mobile gesture best practice

**URL:** <https://forum.babylonjs.com/t/mobile-gesture-best-practice/16867>\
**Category:** Questions\
**Created:** [December 22, 2020, 4:48pm UTC](https://forum.babylonjs.com/t/mobile-gesture-best-practice/16867 "2020-12-22T16:48:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mercurio](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mercurio/32/23383_2.png) [@Mercurio](https://forum.babylonjs.com/u/Mercurio)\
**Post date:** [December 22, 2020, 4:48pm UTC](https://forum.babylonjs.com/t/mobile-gesture-best-practice/16867/1 "2020-12-22T16:48:51Z")

</div>

Hi there,  
i’ve build my own panning with right click on desktop and i would like to make it working also on mobiles.  
On desktop device i use `BABYLON.PointerEventTypes.POINTERMOVE` event and then i work with `pointerInfo.event.movementX and pointerInfo.event.movementY` to get mouse movements.  
On mobile these properties seems to produce no result.  
Only` pointerInfo.event.clientX or pointerInfo.event.clientY` return the screen position of the finger on the device.

How can i get fingers movement like mouse does?  
And, another question, is it possible to handle two fingers gestures?  
Thank you

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 22, 2020, 5:54pm UTC](https://forum.babylonjs.com/t/mobile-gesture-best-practice/16867/2 "2020-12-22T17:54:45Z")

</div>

you should have a look into the built in inputs in the source code : [Babylon.js/arcRotateCameraPointersInput.ts at master · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/arcRotateCameraPointersInput.ts)

---

<div class="post-metadata">

**Author:** ![Mercurio](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mercurio/32/23383_2.png) [@Mercurio](https://forum.babylonjs.com/u/Mercurio)\
**Post date:** [December 23, 2020, 10:02am UTC](https://forum.babylonjs.com/t/mobile-gesture-best-practice/16867/3 "2020-12-23T10:02:36Z")

</div>

Thank you,  
so, if i understand rigth i’ve to add the ` ArcRotateCameraPointersInput` and then try to handle the `onMultiTouch` event. I tryied something similar on this PG [https://playground.babylonjs.com/#A6TFXB#32](https://playground.babylonjs.com/#A6TFXB#32) but i think i miss something. How can i get panning information? It seems i can get only pointA e pointB.

```
 protected onMultiTouch(pointA: Nullable<PointerTouch>,
 pointB: Nullable<PointerTouch>,
 previousPinchSquaredDistance: number,
 pinchSquaredDistance: number,
 previousMultiTouchPanPosition: Nullable<PointerTouch>,
 multiTouchPanPosition: Nullable<PointerTouch>): void
....

```

Can i suggest for the next docs release to include also this informations? I think could be very useful.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 23, 2020, 1:40pm UTC](https://forum.babylonjs.com/t/mobile-gesture-best-practice/16867/4 "2020-12-23T13:40:29Z")

</div>

I am suggesting that you use the source code as an helper to create your own kind of inputs as most of the part related to multi touch panning is in already.
