React-three-fiber, raycaster, touch events, mobile

Haven’t been able to find a clear way to implement touch events with react-three-fiber after researching a bit. I apologize if this is a newbie question. I’m able to implement onClick events to trigger next/router.push(url) on desktop. I’m simply trying to do the same on mobile when the same mesh is touched. All help is much appreciated.

React-three-fiber uses pointer events to handle interactions - so both mouse and touch events should be handled when you use any of the event listeners (if for some reason onClick does not work, you can also try using onPointerDown.)

1 Like

Hell yeah thank you, I should’ve read more, my bad