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);
}