Changing to ArcRotateCamera with Custom Panning Behavior Not Working

In this playground, I see an ArcRotateCamera set up so that the left click controls Panning: Babylon.js Playground (

In my modified version of this playground, 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!

1 Like

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:

Fourth parameter of attachControl contains the button :slight_smile:


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