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.