bberak / react-native-game-engine

A lightweight Game Engine for React Native 🕹⚡🎮
MIT License
2.89k stars 174 forks source link

How to use TouchEvent for continious handelrs? #66

Closed gokadi closed 2 years ago

gokadi commented 2 years ago

Hi! Recently I've faced with the following issue: when I tried to add listeners for "long-press" TouchEvent, it is being executed only once (when the event is triggered). Are there any ways using the Default touch processor to reexecute this listener for every frame/sec? A bit more details about practical use case: shooting when the player just taps and holds his finger on the screen. I already listen "move" and "press" events, but if the player just holds his finger in one position, event is not triggered, and I totally understand why this happens, but are there any ways to achieve what I've described?

bberak commented 2 years ago

Hi @gokadi,

Did you manage to sort out your issue?