Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

Is it possible to get two simultaneous gesture events?

$
0
0

I’m trying to make a game controller. Individually, they work well, but one of them does not work while the other is working. Is it possible to listen to events (including onMove) at the same time?

Controller Move

        this.controllerMove = document.getElementById('controller_move') as HTMLElement

        const gesture: Gesture = createGesture({
          el: this.controllerMove,
          threshold: 0,
          disableScroll: true,
          gestureName: 'controller-move',
          onStart: ev => this.onStart(ev),
          onEnd: () => this.onEnd(),
          onMove: ev => this.onMove(ev)
        })

        gesture.enable()

Controller Rotate (camera)

this.controllerRotate = document.getElementById('controller_rotate') as HTMLElement

        const gesture: Gesture = createGesture({
          el: this.controllerRotate,
          threshold: 0,
          disableScroll: true,
          gestureName: 'controller-rotate',
          onStart: ev => this.onStart(ev),
          onEnd: () => this.onEnd(),
          onMove: ev => this.onMove(ev)
        })

        gesture.enable()

I use: ionic/vue: 5.4.0
Cheking in: Android 11

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>