How to handle multi-touch dual joysticks and buttons simultaneously without blocking other touch events? #4240
Unanswered
lctuan-duck
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
We are developing a high-performance mobile control application that requires a multi-axis interface (specifically, two continuous virtual joysticks operating simultaneously) alongside several discrete control buttons on the same screen.
We are facing a critical multi-touch layout issue where continuous pan gestures either mutually exclusive or completely block other native components on the UI thread. We have tried two architectural approaches, but both result in low-level gesture conflicts:
Scenario 1: Single
GestureHandlerRootView(Dual pan gestures cannot activate simultaneously)Gesture.Pan()) are wrapped inside a single, top-levelGestureHandlerRootView.ACTIVE), Finger 2 touching Controller B is completely ignored. The second pan gesture is instantly canceled or blocked.Scenario 2: Multiple
GestureHandlerRootViews(Dual pan gestures work, but lock out all other buttons)GestureHandlerRootView(rendered via a Portal).Pressable,TouchableOpacity) outside of these isolated root views completely ignore touch events or suffer from massive propagation delays.Questions
Pangestures under a singleGestureHandlerRootViewwithout relying on tightly-coupled cross-referencing refs forsimultaneousHandlers? Is there a way to globally allow specific gesture types to run concurrently?GestureHandlerRootViewsapproach, is there a native or JavaScript-level workaround to prevent them from callingrequestDisallowInterceptTouchEventor hijacking multi-touch events destined for default React Native components outside their view tree?Any insights, architectural advice, or native workarounds would be highly appreciated!
Environment:
^2.29.10.83.0Beta Was this translation helpful? Give feedback.
All reactions