# Orbit Controls scroll on mobile is not working

**URL:** <https://discourse.threejs.org/t/orbit-controls-scroll-on-mobile-is-not-working/40658>\
**Category:** Questions\
**Tags:** orbit-controls\
**Created:** [July 23, 2022, 12:03pm UTC](https://discourse.threejs.org/t/orbit-controls-scroll-on-mobile-is-not-working/40658 "2022-07-23T12:03:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![artrayd](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/artrayd/32/27582_2.png) [@artrayd](https://discourse.threejs.org/u/artrayd)\
**Post date:** [July 23, 2022, 12:03pm UTC](https://discourse.threejs.org/t/orbit-controls-scroll-on-mobile-is-not-working/40658/1 "2022-07-23T12:03:01Z")

</div>

Hello,

I use scroll control to rotate only at axis X. On desktop there is not problem with scrolling, but on mobile scrolling is not working.

Is there a way to allow scrolling for mobile together with Orbit controls?

---

<div class="post-metadata">

**Author:** ![MejdiKazdarlli](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mejdikazdarlli/32/47891_2.png) [@MejdiKazdarlli](https://discourse.threejs.org/u/MejdiKazdarlli)\
**Post date:** [July 23, 2022, 1:04pm UTC](https://discourse.threejs.org/t/orbit-controls-scroll-on-mobile-is-not-working/40658/2 "2022-07-23T13:04:35Z")

</div>

Try the swip event for controlling the camera

---

<div class="post-metadata">

**Author:** ![artrayd](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/artrayd/32/27582_2.png) [@artrayd](https://discourse.threejs.org/u/artrayd)\
**Post date:** [July 28, 2022, 5:55am UTC](https://discourse.threejs.org/t/orbit-controls-scroll-on-mobile-is-not-working/40658/3 "2022-07-28T05:55:04Z")

</div>

@MejdiKazdarlli thank you for the idea, in the end I replicated the scroll behavior. It doesn’t work perfect, but better than nothing 🙂

This is how code looks like:

```
this.$refs.three.addEventListener('touchstart', (e) => {
  this.touchStartY = e.changedTouches[0].screenY
})

this.$refs.three.addEventListener('touchend', (e) => {
  const touchEndY = e.changedTouches[0].screenY
  const scroll = this.touchStartY - touchEndY
  window.scroll({
    top: scroll,
    behavior: 'smooth',
  })
})

```

---

<div class="post-metadata">

**Author:** ![MejdiKazdarlli](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mejdikazdarlli/32/47891_2.png) [@MejdiKazdarlli](https://discourse.threejs.org/u/MejdiKazdarlli)\
**Post date:** [July 28, 2022, 10:49am UTC](https://discourse.threejs.org/t/orbit-controls-scroll-on-mobile-is-not-working/40658/4 "2022-07-28T10:49:02Z")

</div>

[Detecting a swipe (left, right, top or down) using touch](http://www.javascriptkit.com/javatutors/touchevents2.shtml#:~:text=Swiping%20in%20touch%20is%20the,%2C%20well%2C%20%22swipe%22).

Maybe that CAN help 😉
