How to tweek MouseOrbit script

Hi, how to tweek the MouseOribit to make it work as inside the Unity3D IDE environment. That is, only when you hold down the right mouse button that you can rotate the camera, instead of rotating all the times with the mouse.

sorround the code in the update method with an if statement like this

if(Input.GetMouseButton(0))
{
// paste here the whole content of the update method
}

thats it

No, that never works.

It’s actually GetMouseButton(1) for the right mouse button.