Stuttering camera problem

Hi all,
I’m new to Unity and Javascript ( decided to go with it for starters). I’m having an issue with the following code snippets. The script is attached to the camera.avatar is a gameobject that is moving at a constant speed along x. They both work exactly the same but the bottom one results in camera stuttering. Could someone explain why please.

function Update () {
transform.position = Vector3(GameObject.Find(“avatar”).GetComponent(Transform).position.x, 0, -60);
}


function Update () {
avatarx = GameObject.Find(“avatar”).GetComponent(Transform).position.x;
transform.position = Vector3(avatarx, 0, -60);
}

I’ve tried these scripts in late update as well, but exact same results. Interpolation is turned on on the avatar gameobject. Anyone?

apologies for the duplicate thread but just realize I posted this in the wrong area, I’ve reposted to http://forum.unity3d.com/threads/109069-Stuttering-camera-problem?p=722417#post722417 . Not sure if there is anyway I can delete this one, if none, then I would appreciate it if a moderator would.

You can delete your own posts through the “edit post” option.

hmm, had a look around the options but couldn’t find anything for delete. At the bottom in the posting permissions section there was no mention of being able to delete own posts :frowning:

Whoa :open_mouth: , and now my other thread is gone :S .

oh well I reposted in the other forum.