Replies: 2 comments 2 replies
-
https://codesandbox.io/s/r3f-suspense-zu2wo mixing orbitcontrols with manual cam movement is harder because, as always, threejs likes mutation and controls mutate the camera. so you need to disable controls while the manual movement is going on. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hey @brian3814, can you please share your solution? The code snippet shared by @drcmda does not seem to be relevant anymore to this topic somehow. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Total newbie to js & r3f here, please bear with me if it's a silly question.
I'm planning to build a model viewer and the 3d content will consist of several sub-models. I would like to automatically set the camera default position to a certain distance away from the box center of the specific loaded sub-model , after that controls (e.g orbitcontrol, etc) will take over.
But as far as i've researched, all examples have the camera position set manually and I can't figure out a way to do it automatically. I've just started and by far here is the result.
Besides, i plan to allow switching controls in the future, so if possible i hope the solution can be compatible when this function is added.
Any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions