Skip to content

OrbitControls with fixed camera position #877

Answered by mwmwmw
bknill asked this question in Q&A
Discussion options

You must be logged in to vote

You could set the min/max distance to something very small.

<OrbitControls minDistance={0} maxDistance={0.01} />

This will make the OrbitControls behave like it's zoomed all the way in.

https://codesandbox.io/s/zoomed-orbit-controls-forked-ot5im7?file=/src/index.js:879-931

Alternatively, you could use PointerLockControls if you want a more direct (FPS) user control of the camera.
https://codesandbox.io/s/pointer-lock-controls-gzn0c5

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bknill
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants