Sorry guys I know this has been answered in many different ways but I just cant work out how to apply to my code. could you help me to limit the roty so it only rotates about 10 degrees. Many thanks Tim
public class rotteeth : MonoBehaviour
{
float RotSpeed = 5;
void OnMouseDrag ()
{
float rotx = Input.GetAxis("Mouse X")*RotSpeed*Mathf.Deg2Rad;
float roty = Input.GetAxis ("Mouse Y")*RotSpeed*Mathf.Deg2Rad;
transform.RotateAround(Vector3.up, -rotx);
transform.RotateAround (Vector3.right, roty);
}
}