# Restricting OrbitControls to Specific Axes While Preserving Default Behavior

**URL:** <https://forum.techsoft3d.com/t/restricting-orbitcontrols-to-specific-axes-while-preserving-default-behavior/4623>\
**Category:** HOOPS Visualize Web\
**Tags:** code, knowledge-base, how-to\
**Created:** [May 8, 2025, 9:07am UTC](https://forum.techsoft3d.com/t/restricting-orbitcontrols-to-specific-axes-while-preserving-default-behavior/4623 "2025-05-08T09:07:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cad-developer](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cad-developer](https://forum.techsoft3d.com/u/cad-developer)\
**Post date:** [May 8, 2025, 9:07am UTC](https://forum.techsoft3d.com/t/restricting-orbitcontrols-to-specific-axes-while-preserving-default-behavior/4623/1 "2025-05-08T09:07:49Z")

</div>

Is it possible to restrict the OrbitControls functionality to specific axes (X, Y, or Z) while still maintaining its default behavior, similar to the Autodesk Forge Viewer? If so, how can this be implemented?

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [May 8, 2025, 2:02pm UTC](https://forum.techsoft3d.com/t/restricting-orbitcontrols-to-specific-axes-while-preserving-default-behavior/4623/2 "2025-05-08T14:02:18Z")

</div>

Please take a look at [CameraTurntableOperator](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Operators.Camera.CameraTurntableOperator.html#cameraturntableoperator). Setting a specific rotation axis can be done via the function [CameraTurntableOperator.setRotationAxis](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Operators.Camera.CameraTurntableOperator.html#Operators.Camera.CameraTurntableOperator.setRotationAxis).

---

<div class="post-metadata">

**Author:** ![cad-developer](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cad-developer](https://forum.techsoft3d.com/u/cad-developer)\
**Post date:** [May 9, 2025, 9:39am UTC](https://forum.techsoft3d.com/t/restricting-orbitcontrols-to-specific-axes-while-preserving-default-behavior/4623/3 "2025-05-09T09:39:10Z")

</div>

Okay I got it. Thanks!
