# ArcRotateCamera and right click

**URL:** https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901
**Category:** Questions
**Created:** [August 2, 2019, 3:08pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901 "2019-08-02T15:08:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![lluull](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lluull/32/3104_2.png) [@lluull](https://forum.babylonjs.com/u/lluull)
#### Post date: [August 2, 2019, 3:08pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901/1 "2019-08-02T15:08:08Z")

</div>

Hi,

I realise a dont introduce myself here, sorry about this.

I am technical artist getting more and more interest in the technical side even if my level in math is fairly low (alway looking by the window at school).

Since last month’s i am looking around all this current web tech’s, searching for my next fall in love.  
i think i have found the major chemical ingredients.  
To be honest i dont have any prior background or experience in this area, so, the challenge is here directly from start.  
Also, for personal taste, learning purpose and conviction, i try to limit the dependencies as much as possible, so, no jquery, no vue, no react, no sass, etc … and all sort of big heavy over framework.

Here we are, i pick:  
Typescript, because they say is modern, is typed and is like a upper class over javascript, why hesitate.  
Electron, this is like the central point in my need about program mixing desktop and web universe.  
And of course Babylon 🙂 which i am very happy about, obviously is needed to learn it … understand it etc…  
For the 2d ui layer i will go for simple html5 and normal css.

All this to warn about, i will surely pull here very basic and naive questions.  
Also, as Deltakosh ighlight it i probably have tendency to read to diagonaly the doc and the thread here 🙂  
So, thanks all of you guys in advance for your time and passion.

Ok, let start my new questions:

1. i want to keep the ArcRotateCamera mouse control but without the right click.  
i already disable the keyboard and set the panning

> - camera.inputs.remove(camera.inputs.attached.keyboard);
> - camera.panningSensibility = 0;  
> note:  
> the middle mouse button rotate also the camera which is not a problem, even if it could be nice to disable too.

1. How to rotate the sphere (rotation.y) with the right mouse button without influencing the camera ?

[ArcRotateCamera and right click](https://www.babylonjs-playground.com/ts.html#7RT4XP)

thx.

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [August 2, 2019, 3:23pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901/2 "2019-08-02T15:23:57Z")

</div>

Welcome 🙂 and thanks for your this introduction!

1. you can specify that you only want the left mouse button with `camera.inputs.attached.pointers.buttons = [0];` =\> [https://www.babylonjs-playground.com/ts.html#7RT4XP#1](https://www.babylonjs-playground.com/ts.html#7RT4XP#1)
2. Now that the camera does not use the right button anymore, you can simply add an observer on `scene.onPointerObservable =\> [https://www.babylonjs-playground.com/#1GLEJK#8](https://www.babylonjs-playground.com/#1GLEJK#8)

---

<div class="post-metadata">

### Author: ![lluull](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lluull/32/3104_2.png) [@lluull](https://forum.babylonjs.com/u/lluull)
#### Post date: [August 3, 2019, 3:12am UTC](https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901/3 "2019-08-03T03:12:28Z")

</div>

Hi,

i am always amazed how the answer is straight and simple … this make me a little shame, i should find the solution my self instead of taking your time …

Here what i have for who like me are at the begin of ther Babylon journey.

[https://www.babylonjs-playground.com/ts.html#7RT4XP#2](https://www.babylonjs-playground.com/ts.html#7RT4XP#2)

Thx.

---

<div class="post-metadata">

### Author: ![lluull](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lluull/32/3104_2.png) [@lluull](https://forum.babylonjs.com/u/lluull)
#### Post date: [August 3, 2019, 4:28am UTC](https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901/4 "2019-08-03T04:28:59Z")

</div>

Hi,  
update about Typescript again.

[https://www.babylonjs-playground.com/ts.html#7RT4XP#3](https://www.babylonjs-playground.com/ts.html#7RT4XP#3)

> camera.inputs.attached.pointers.buttons = [0]; // do not work in my project  
> (camera.inputs.attached.pointers as ArcRotateCameraPointersInput).buttons = [0]; // obligate to write like this to make it work

i guess is the cost of the typed approach, anyway, more or less complex syntaxe, the main think is to get it working.

Thx.

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [August 5, 2019, 4:05pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-and-right-click/4901/5 "2019-08-05T16:05:25Z")

</div>

yes this is the price to pay 🙂
