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