Rotating camera axis conflict.

My goal is to make the camera rotating around, and looking at an object by simply dragging the mouse.

But - I get a lot of stuttering and weird jumps, however if i remove one of the axis from the code
everything works fine on the one axis.
Hope that made sense to somebody.

I don’t know if i have to split the code up some how or if i have to go in a whole new direction.

public var target : Transform;


function FixedUpdate()
{  
    transform.LookAt(target);
    
    var k : float = Input.GetAxis("Mouse Y") * 140 ;
    var m : float = Input.GetAxis("Mouse X") * 140 ;
    
    transform.RotateAround (target.position, Vector3.right, -k * Time.deltaTime);
    transform.RotateAround (target.position, Vector3.up, m * Time.deltaTime);
}

There are many camera orbit snippets of code on the web already. I just typed “unity3d camera orbit” into google and the very first result links to a free script on the unity wiki in javascript or C# :

http://wiki.unity3d.com/index.php?title=MouseOrbitImproved

IF that does not help you check out the other results from the google search.

Thnx for the response.