iTween: Moving a camera with an object and keeping the object in the view

I want to create an invisible elastic link between a camera and a target object in such a way that camera will move with the target object and keep the target object in view.

iTween’s MoveUpdate function seems to be good for this. I use the following code

var target : Transform; 
function Update () {
  iTween.MoveUpdate(gameObject, {"position":target.position, "time":5, "looktarget":target.position, "looktime":0 });
}

Camera moves with the target and the target is in the view, but it is choppy. Is it possible to fix this issue?

Is it still choppy if you run this in FixedUpdate or LateUpdate? Why have a “looktime” of 0? I’d recommend a very small amount of time to ensure all easing equations run smoothly.

pixelplacement1, thank you for your reply.
I tried all Update, FixedUpdate and LateUpdate options.

var target : Transform; 
function LateUpdate  () {
  iTween.MoveUpdate(gameObject, {"position":target.position, "time":3, "looktarget":target.position, "looktime":5 });
}

I also increased the “looptime” from 0 to 5. Now, target object occasionally escapes from the view, but the result still choppy.

My target loops on a path using following one line iTween code. The path generated using iTweenPath Editor. Could this be the problem?

using UnityEngine;
using System.Collections;

public class MoveOveriTweenPath : MonoBehaviour {
	void Start () {
		iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("Path01"), "easetype", "linear", "time",25, "islocal",true, "orientToPath",true, "lookTime", 0.2, "loopType", "loop"));
	} 
}

-Adamo

470235–16532–$TestPackage.unitypackage (22.7 KB)