# How to preserve the up vector of the camera when orbiting?

**URL:** <https://forum.techsoft3d.com/t/how-to-preserve-the-up-vector-of-the-camera-when-orbiting/2675>\
**Category:** HOOPS Visualize Web\
**Created:** [September 20, 2023, 8:24pm UTC](https://forum.techsoft3d.com/t/how-to-preserve-the-up-vector-of-the-camera-when-orbiting/2675 "2023-09-20T20:24:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guillaume.robichaud](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@guillaume.robichaud](https://forum.techsoft3d.com/u/guillaume.robichaud)\
**Post date:** [September 20, 2023, 8:24pm UTC](https://forum.techsoft3d.com/t/how-to-preserve-the-up-vector-of-the-camera-when-orbiting/2675/1 "2023-09-20T20:24:22Z")

</div>

We basically want to have a user setting for keeping the “horizon” at all times when orbiting (similar to SketchUp).

It’s rather easy to just set the up vector of the camera but I wonder how I can change the existing orbit operator to do this on each frame.

---

<div class="post-metadata">

**Author:** ![guido](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/guido/32/115_2.png) [@guido](https://forum.techsoft3d.com/u/guido)\
**Post date:** [September 21, 2023, 12:14pm UTC](https://forum.techsoft3d.com/t/how-to-preserve-the-up-vector-of-the-camera-when-orbiting/2675/2 "2023-09-21T12:14:46Z")

</div>

The orbit operator has a special “BIM” orbit mode that should do what you want:  
[https://docs.techsoft3d.com/communicator/latest/api\_ref/viewing/classes/Communicator.Operator.CameraOrbitOperator.html#Communicator.Operator.CameraOrbitOperator.setBimOrbitEnabled](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Operator.CameraOrbitOperator.html#Communicator.Operator.CameraOrbitOperator.setBimOrbitEnabled)

```auto
let op = hwv.operatorManager.getOperator(Communicator.OperatorId.Orbit);
op.setBimOrbitEnabled(true);

```

---

<div class="post-metadata">

**Author:** ![guillaume.robichaud](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@guillaume.robichaud](https://forum.techsoft3d.com/u/guillaume.robichaud)\
**Post date:** [September 21, 2023, 12:54pm UTC](https://forum.techsoft3d.com/t/how-to-preserve-the-up-vector-of-the-camera-when-orbiting/2675/3 "2023-09-21T12:54:25Z")

</div>

Thank you, it seems to work for the orbit. But how do you disable the stuttering zoom when middle-clicking something?

---

<div class="post-metadata">

**Author:** ![guillaume.robichaud](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@guillaume.robichaud](https://forum.techsoft3d.com/u/guillaume.robichaud)\
**Post date:** [September 21, 2023, 1:02pm UTC](https://forum.techsoft3d.com/t/how-to-preserve-the-up-vector-of-the-camera-when-orbiting/2675/4 "2023-09-21T13:02:07Z")

</div>

Nevermind my question, it’s a mouse problem on my side, there’s no stuttering zoom, just an overly sensitive scroll wheel 😉
