<p dir="auto"><strong>Describe the bug</strong></p>
<p dir="auto">i have orbitcontroller.update() in the animate loop for damping<br>
and<br>
after doing orbitcontroller.enabled=false , i still cant tilt the camera,</p>
<p dir="auto">my guess is , the update logic to prevent the camera from tilting /going upside down is still running<br>
<strong>Expected behavior</strong><br>
maybe in the update function when orbitcontroller.enabled=false , return early ?</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/mrdoob/three.js/blob/0d7fb8d74f3c4d4e465b5a92ada65e1c789708e1/examples/jsm/controls/OrbitControls.js#L154">three.js/examples/jsm/controls/OrbitControls.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 154
      in
      <a data-pjax="true" class="commit-tease-sha" href="/mrdoob/three.js/commit/0d7fb8d74f3c4d4e465b5a92ada65e1c789708e1">0d7fb8d</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L154" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="154"></td>
          <td id="LC154" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">update</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto"><strong>Platform:</strong></p>
<ul dir="auto">
<li>Device: [Desktop, Mobile]</li>
<li>OS: [Windows]</li>
<li>Browser: [Chrome]</li>
<li>Three.js version: [dev]</li>
</ul>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto">I was trying to manually set camera to a position and lookat target and disable control. However the disable does not seem to really shut down control from meddleing with the camera, unless I also set the control's target to be the same as the new camera's lookat target, it will update the camera.</p>
<p dir="auto">Sample code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Try set my camera, then disable orbit control
updateCamera(pos, target) {
    this.camera.position.copy(pos);
    this.camera.lookAt(target);
    // This won't work
    this.orbitControl.enabled = false;
}"><pre class="notranslate"><span class="pl-c">// Try set my camera, then disable orbit control</span>
<span class="pl-en">updateCamera</span><span class="pl-kos">(</span><span class="pl-s1">pos</span><span class="pl-kos">,</span> <span class="pl-s1">target</span><span class="pl-kos">)</span><span class="pl-kos"></span> <span class="pl-kos">{</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">camera</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-en">copy</span><span class="pl-kos">(</span><span class="pl-s1">pos</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">camera</span><span class="pl-kos">.</span><span class="pl-en">lookAt</span><span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-c">// This won't work</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">orbitControl</span><span class="pl-kos">.</span><span class="pl-c1">enabled</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Possible cause that I guess:<br>
I have a mainloop calback that keeps calling orbitControls.update() for inertia animation, my guess is that the update function meddles with camera and does not respect that enabled=== false setting.</p>
<p dir="auto">I found the cure is to add this:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="this.orbitControls.target = pos; // I also noted that setting target would re-enable a disabled orbit controls."><pre class="notranslate"><span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">orbitControls</span><span class="pl-kos">.</span><span class="pl-c1">target</span> <span class="pl-c1">=</span> <span class="pl-s1">pos</span><span class="pl-kos">;</span> <span class="pl-c">// I also noted that setting target would re-enable a disabled orbit controls.</span></pre></div>
<p dir="auto">I guess my main complaint is that I did not expect orbitControls to be able to change camera at all, after setting disabled. Including setting target, or calling update.</p>
<h5 dir="auto">Three.js version</h5>
<p dir="auto">r118</p>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
</ul>