# Changing to ArcRotateCamera with Custom Panning Behavior Not Working

**URL:** <https://forum.babylonjs.com/t/changing-to-arcrotatecamera-with-custom-panning-behavior-not-working/22379>\
**Category:** Bugs\
**Tags:** camera\
**Created:** [July 15, 2021, 1:04am UTC](https://forum.babylonjs.com/t/changing-to-arcrotatecamera-with-custom-panning-behavior-not-working/22379 "2021-07-15T01:04:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrieljbaker](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gabrieljbaker/32/12670_2.png) [@gabrieljbaker](https://forum.babylonjs.com/u/gabrieljbaker)\
**Post date:** [July 15, 2021, 1:04am UTC](https://forum.babylonjs.com/t/changing-to-arcrotatecamera-with-custom-panning-behavior-not-working/22379/1 "2021-07-15T01:04:24Z")

</div>

In this playground, I see an ArcRotateCamera set up so that the left click controls Panning: [Babylon.js Playground (babylonjs-playground.com)](https://www.babylonjs-playground.com/#VE33T#14)

In my [modified version of this playground](https://www.babylonjs-playground.com/#VE33T#24), though, I start out with a Universal Camera and then have a simple button that changes the camera to an ArcRotateCamera with the same custom panning settings as configured in the top playground. When the switch happens, though, while the camera does change, the panning behavior is instead the default panning behavior on the ArcRotateCamera, and left click rotates instead of pans.

Is this a bug or am I doing something wrong? Any help appreciated!

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 15, 2021, 1:13am UTC](https://forum.babylonjs.com/t/changing-to-arcrotatecamera-with-custom-panning-behavior-not-working/22379/2 "2021-07-15T01:13:32Z")

</div>

You are calling into a reserved property \_panningMouseButton, this is actually only public for our internal use.

This is indeed set in the attachControl function where you could specify it: [https://www.babylonjs-playground.com/#VE33T#26](https://www.babylonjs-playground.com/#VE33T#26)

Fourth parameter of attachControl contains the button 🙂

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 15, 2021, 1:14am UTC](https://forum.babylonjs.com/t/changing-to-arcrotatecamera-with-custom-panning-behavior-not-working/22379/3 "2021-07-15T01:14:29Z")

</div>

And if you prefer to use the internal (kind of at your own risk 🙂 ) you should set it after attachControl
