Lock camera's position while scroll mouse is down

Hi,

I’m using a pick-throw object system which allow me to rotate the picked object while pressing the scroll wheel. I’d like to improve this by locking the camera’s position, but I am using the First Person Controller from basic standard asset

So I think I need to do something with this code (found in FirstPersonController.cs)

private void RotateView()
        { 
           m_MouseLook.LookRotation(transform, m_Camera.transform);
        }

but not sure

What is the best way to do this ?

Thanks !!

if(!Input.GetMouseButton(2)){
m_MouseLook.LookRotation(transform, m_Camera.transform);
}

Your instance may be a little more complex, but that is the general method for it.