You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering if there is a way to achieve touch-action: pan-y effect for mobile interaction, so if I first drag horizontally then i can interact with 3d model using orbit controls, otherwise i can scroll the page. It feels intuitive and can allow for both.
the examples on model viewer site on mobile works perfect.
i think To achieve the desired touch interaction using react-three-fiber, you need to combine the library with the drei library for orbit controls and handle touch events to distinguish between horizontal and vertical swipes. Below is a detailed guide on how to implement this in a react-three-fiber application.
Step 1: Set Up Your Project
Ensure you have react-three-fiber and drei installed. If not, you can install them using:
Step 2: Create Your React Component
App Component:
Hi There,
I am wondering if there is a way to achieve touch-action: pan-y effect for mobile interaction, so if I first drag horizontally then i can interact with 3d model using orbit controls, otherwise i can scroll the page. It feels intuitive and can allow for both.
the examples on model viewer site on mobile works perfect.
https://modelviewer.dev/
i also tried applying the same css property on canvas, but no luck so far
The text was updated successfully, but these errors were encountered: