Locking rotation problem?

Hello…
I want to lock the roatation of x axis in the following simple code:

var rotateJoystick : Joystick;
var cameraPivot : Transform;
var rotationSpeed : Vector2 = Vector2( 50, 25 );
function Update()
{
    var camRotation = rotateJoystick.position;
	camRotation.x *= rotationSpeed.x;
	camRotation.y *= rotationSpeed.y;
	camRotation *= Time.deltaTime;

  1 cameraPivot.Rotate(0, camRotation.x, 0, Space.World);
  2	cameraPivot.Rotate(camRotation.y,0,0);
}	

The statement (cameraPivot.Rotate(camRotation.y,0,0):wink: is the statement that I want to lock rotation around?

if rigidbody attached with your game object then go

rigidbody->constrains ->freeze rotation ->check the bool var of x;