clutch key

Hi all

I have a clutch key set up, which when pressed allows me to control the camera’s movement with a three button mouse.

Space + left mouse button is orbit
Space + middle mouse button is zoom
Space + right mouse button is pan

My question is… How do I disable all other mouse clicks and raycast events while I hold the space key down? So whilst I’m moving the camera, I don’t trigger any rollovers, clicks etc.

Thanks for your help

Apolgies for the bump

I have figured it out… I think?

So if anyone has the same problem… or has a better solution this is the code:

var target : GameObject;

function OnMouseDown () {
	if (Input.GetKey(KeyCode.Space)) 
        {
//Don't do anything.
        }
    else
        { 
		 Camera.main.SendMessage("CameraLookAt", target);
}
}