Problem with Raycast hit

I’m using raycast to move my camera around different positions, it works the first time, but after that it never calls the function again. Also it doesnt work over longer distances even though i know the ray is long enough.

if (Input.GetMouseButtonDown(0))
{
	var hit : RaycastHit;
	var ray = camera.ViewportPointToRay(Vector3(0.5,0.5,0));
	print("mouse down");
	if (Physics.Raycast(ray, hit, Length)) 
	{
		var hitObject = hit.collider.gameObject;
		print("is hitting something");
		if (hitObject.gameObject.tag == "Useable")
		{
			print("hit useable item");
			nextCamera = hitObject;
		}
	}
}
}

Problem fixed by removing “Length” from if (Physics.Raycast(ray, hit, Length))