4

I'm having a hard time figuring out how to zoom an OrbitControls with Three.JS.

I have looked through the source many times and I can see methods called dollyIn() and dollyOut() but I can't access them from my own code.

I have tried the method .zoom but it does nothing.

Is it possible to zoom by code?

vaid
  • 1,390
  • 12
  • 33
  • 2
    See https://github.com/mrdoob/three.js/pull/9005/files – WestLangley Apr 03 '17 at 00:46
  • @WestLangley It gives me the following error: `controls.rotateCameraUp is not a function` – vaid Apr 15 '17 at 23:38
  • Possible duplicate of [orbitcontrols.js: How to Zoom In/ Zoom Out](https://stackoverflow.com/questions/41198618/orbitcontrols-js-how-to-zoom-in-zoom-out) – Sphinxxx Jan 14 '18 at 18:31
  • https://stackoverflow.com/questions/39856907/three-js-orbitcontrols-js-invoking-zoom-in-out-with-button-controls-dollyout – OG Sean Apr 05 '23 at 03:04

0 Answers0