My problem is that I need an object, in itself it is the arm of my character, the problem is that this, like my code, I think is very broad and I want to place restrictions on it, such as not having a 360 degree rotation capacity or that it only remains in the front because it is a weapon arm, that is to say that it will be held forward like a pistol, but it can be rotated to the sides, up and down just to aim the target.
My code:
objetodejuego[0].transform.Rotate((Input.GetAxis("Mouse Y") * velocidad * Time.deltaTime), (Input.GetAxis("Mouse X") * velocidad * Time.deltaTime), 0, Space.World);
I found my solution and adapted it to my parameters:
I found the answer here: http://answers.unity3d.com/questions/1344322/free-mouse-rotating-camera.html