Camera Dampening

Heya all --

I'm trying to add dampening to a side-scrolling camera. Here is my code attached to the camera:

var smoothTime = 0.3;
var cameraDampening = 10.0;
var target:Transform;
var newPositionX:float;
var newPositionY:float;

function FixedUpdate () {
    newPositionX = Mathf.SmoothDamp(transform.position.x, target.position.x, cameraDampening, smoothTime);
    newPositionY = Mathf.SmoothDamp(transform.position.y, target.position.y, cameraDampening, smoothTime);

    transform.position = Vector3(newPositionX, newPositionY, transform.position.z);

But what happens is that going left and right makes the camera go up and down, and vice versa. It seems like I've switched the axes, but I'm not seeing where. Any help?

Thanks so much!

I tried this instead, and it works pretty well:

function Update () {
    // smoothing
    transform.position = Vector3.SmoothDamp(transform.position, target.position, velocity, smoothTime);
    // clamp z position for side-scrolling
    transform.position = Vector3.Scale(transform.position, Vector3(1, 1, 0));