ArcRotateCamera Panning

Hello fellow Babylonians,
As we now, the ArcRotateCamera works the following way:

  1. You can rotate around a target with a left mouse click
  2. You can start panning with a right mouse click

I was wondering if there exists a way to switch the mouse keys on both operations. In other words, I want to rotate with RIGHT mouse click, and do panning with the LEFT mouse click.

Ok, I just solved it. If anyone wants to know how:
myCamera.attachControl(canvas, true, true, 0);

where, 0 is for the left mouse key, and 1 is for right one… I think… I am not really sure but it works!

You are correct :slight_smile:

Also, If you have any onContextMenu aka onRightClick events, the camera will go back to its original settings (left for rotate, right for panning), so just add this myCamera.attachControl(canvas, true, true, 0 ); at the end of your onContextMenu function.