Pointing object to Mouse X and Z

I’m trying to make a shooter game similar to Angry Bots. But I’m having trouble rotating the object in relation to the mouse. (top camera view and rotation Z and X)

I tried this code but…
When the mouse is in the top half of the screen it rotates correctly
When the mouse is in the bottom half of the screen it rotates the opposite way

 var speed : float = 1.0; 

function Update(){

  transform.Rotate(Vector3(0 , Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Z")) * Time.deltaTime * speed);

}

Do you mean rotating an object to face the mouse pointer? If so, you will need to use trigonometry to do it. I think that using tranform.rotate takes an argument of 3 angles to rotate an item around the three axes, so you might need to calculate the angle based on the position of the object relative to the mouse. If this is what you want to do, look up the sine and cosine formulae to do it. I think Transform.LookAt might do this for you, but not sure.