# Unable to set zoom limits for orthographicCamera using TrackballControls

**URL:** https://discourse.threejs.org/t/unable-to-set-zoom-limits-for-orthographiccamera-using-trackballcontrols/32215
**Category:** Questions
**Tags:** orthographic-camera, trackball-controls
**Created:** [November 29, 2021, 11:31pm UTC](https://discourse.threejs.org/t/unable-to-set-zoom-limits-for-orthographiccamera-using-trackballcontrols/32215 "2021-11-29T23:31:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jessicacao1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jessicacao1/32/22536_2.png) [@jessicacao1](https://discourse.threejs.org/u/jessicacao1)
#### Post date: [November 29, 2021, 11:31pm UTC](https://discourse.threejs.org/t/unable-to-set-zoom-limits-for-orthographiccamera-using-trackballcontrols/32215/1 "2021-11-29T23:31:53Z")

</div>

Hi!

I have [this example](https://codesandbox.io/s/orthographic-zoom-limit-07u1v?file=/src/index.js) which uses TrackballControls and OrthographicCamera. Currently I’m trying to set zoom limits using maxDistance and minDistance, which looks like

```javascript
control.minDistance = 200
control.maxDistance = 300

```

However these values seem to be ignored for OrthographicCameras as the cube continues to be able to be zoomed to 0 or infinity. Is there anything else I can try?

---

<div class="post-metadata">

### Author: ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)
#### Post date: [November 30, 2021, 10:07am UTC](https://discourse.threejs.org/t/unable-to-set-zoom-limits-for-orthographiccamera-using-trackballcontrols/32215/2 "2021-11-30T10:07:25Z")

</div>

Looking at the source code it seems both properties only work for perspective cameras.

Would it be possible for you to switch to `OrbitControls`? This class supports what you are looking for via its [minZoom](https://threejs.org/docs/index.html#examples/en/controls/OrbitControls.minZoom) and [maxZoom](https://threejs.org/docs/index.html#examples/en/controls/OrbitControls.maxZoom) properties.

---

<div class="post-metadata">

### Author: ![jessicacao1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jessicacao1/32/22536_2.png) [@jessicacao1](https://discourse.threejs.org/u/jessicacao1)
#### Post date: [November 30, 2021, 4:42pm UTC](https://discourse.threejs.org/t/unable-to-set-zoom-limits-for-orthographiccamera-using-trackballcontrols/32215/3 "2021-11-30T16:42:24Z")

</div>

Unfortunately my use case requires the ability to spin a mesh 360 degrees around all three axes using `OrthographicCamera`, so I’d need to stick with `TrackballControls`.

Is there a plan to get `TrackballControls` to support zoom limits for `OrthographicCamera`? If so, I can go log an issue in the repo.

---

<div class="post-metadata">

### Author: ![agargaro](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/agargaro/32/35529_2.png) [@agargaro](https://discourse.threejs.org/u/agargaro)
#### Post date: [November 21, 2024, 1:45pm UTC](https://discourse.threejs.org/t/unable-to-set-zoom-limits-for-orthographiccamera-using-trackballcontrols/32215/5 "2024-11-21T13:45:55Z")

</div>

[minZoom](https://threejs.org/docs/#examples/en/controls/TrackballControls.minZoom) and [maxZoom](https://threejs.org/docs/#examples/en/controls/TrackballControls.maxZoom) have been added to the `trackballControls`.
