Replies: 1 comment 2 replies
-
If I remember correctly model-viewer had a feature that blocks vertical interactions (maybe just on mobile) so that you can scroll the page on mobile and the model container doesn't take away the scroll interaction, you had to start the vertical movement with a little horizontal move for it to work, maybe that feature is blocking your vertical interaction? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
I am trying to edit the Three.js code inside the ModelViewer script to add drag functionality for the objects in the scene. The drag should work as if you are moving the objects on a plane.
Assuming a sofa on the floor as a real-life scenario, I should be able to drag the model towards me when I drag the mouse vertically down and away it should take the model away in side views, front view, and back view. When I drag the mouse horizontally, it should move left or right depending on where I am moving the mouse.
In the top view, the horizontal drag should move the model horizontally, and the vertical drag should move it vertically.
Here is what I have done so far
Below is how my onpointer move function look like.
This works, but when I am in the front view and drag it vertically, it just stays there, as if it is locked. It works in other views as intended. How do I solve this? Any help would be appreciated. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions