Detect the touch events on GLView

Does anyone know if on GLView we can detect the synthetic touch events from the View component? onResponderGrant, onResponderMove, and so on…

Or maybe is there some other way to detect touch events from GLView?

I didn’t find such info in the docs, forums, neither Google.


1 Like

Hi, yes, I think either just pass the responder props into the GLView, or if that doesn’t work, pass them into its container view. Once you receive the touch events you will need to convert the touch coordinates from screen space to your GL view’s camera/world space.

Hi Ben, thanks for the response.

Neither the GLView or the container View are receiving the touch events. I also added pointerEvents="none" but no touch event is received:

  _onResponderGrant = (event) => {

  _onResponderMove = (event) => {

  _onResponderRelease = (event) => {

  render() {
    return (
      <View style={styles.container}

If that doesn’t work, I’ll use a WebView and implement that directly in web.


Does this work when the target is not a GLView but (say) a regular View instead? That’s one way to debug this. In any case, using a PanResponder is known to work, as in – just in your case rather than a THREEView you would use a GLView.

Hi Ben, can you explain a bit more about how to convert the touch coordinates into the GLView coordinates? I put the responder props on the container View and it is detecting touches. I am also using expo-2d-context for drawing inside the GLView if that helps.

I’m looking to do something like this as well.