iTween Get the path from object nodes and move the object at same speed by loop

I need to move my camera using the itween function with itween nodes when moving camera should look at the target object. camera rotate at continuous loop and which is move the same speed.

I have try to to this but still i have a issue.

So, please hep me to do this.


You don’t need the whole percent changing.

Your code should only be:

void Start () {
       path = iTweenPath.GetPath("Main");

    // Update is called once per frame
    void Update () {
    void OnGUI()
       if(GUI.Button(new Rect(0,0,100,30), "Testing"))
         iTween.PutOnPath(gameObject, path, percent);

And instead of using PutOnPath, use MoveTo with looktarget and other settings.

look at the documentation:
iTween Docs