I have my characters rotation linked to the iphones accelerometer and currently it works perfectly.
the problem is he can rotate 360 degrees in all directions.
I’d like to clamp the rotations but the only way i can think of is Euler angels, since I’m very unfamiliar with quaternions an how they work.
can anyone help me find some better more efficient ways to clamp the rotation?
Do you want to restrict specific angles?
Dont rotate on z or y angles?
If thats the case so could you do something i did with my turret script 
/*
Turret targetting uses a linecast to check if the turret have an -
free line of sight towards the player.
The turret and player must be set to ignore raycast ! in the layer panel in the inspector.
RaycastHit = Used to get information back from a raycast.
*/
private var hit : RaycastHit;
var speed : int = 3;
function Update () { //main loop start
var target = GameObject.FindWithTag("Player") ;
if (Physics.Linecast(transform.position, target.transform.position, hit)) {
// to se wath the ray hits = print ("Blocked by " + hit.collider.name);
}
else {
// Put the barrel on the top of the model as this look at rotation is restricted to z axis !
//Remove ( , Vector3.forward ) at the end so will you get an all axis smooth look at rotation.
// Also remove these ( newRotation.x = 0.0; newRotation.y = 0.0; )
// Get the target rotation
var newRotation = Quaternion.LookRotation(transform.position - target.transform.position, Vector3.forward);
newRotation.x = 0.0;
newRotation.y = 0.0;
// Smoothly rotate towards the target .
transform.rotation = Quaternion.Slerp(transform.rotation, newRotation, speed*Time.deltaTime);
}
} // main loop end //
Sorry for all the text statements! as iam still early in learning unity and its scripting 
more along the lines of i only want it to rotate 30 degree’s below the starting x-axis and 70 degrees above the starting x- axis.
All info you nead is here 
But its an boo script?
thanks gamer, i’ve never used a boo script before, but it says on the wiki that it hsould work with java and c# so it should work easy enough.