Zoom Controls Not working until i rotate the screen with orbitControls Rotation #2333
Unanswered
Kawan-edres
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there , how do i use zoom controls with Orbit Controls cause i used this code
function Zoom() {
const { zoom } = useControls({ zoom: { value: 0.2, min: 0.2, max: 1, step: 0.01 } })
return useFrame((state) => {
state.camera.zoom = THREE.MathUtils.lerp(state.camera.zoom, zoom * 4, 0.1)
state.camera.updateProjectionMatrix()
})
}
i saw it in one example that you are provided but MapControl was used in that example i want to use it with OrbitControls but it is not working until i am rotating the screen then it starts to zoom in or out
please any one can help ?
Beta Was this translation helpful? Give feedback.
All reactions