- Home /
Question by
corax · Dec 13, 2012 at 05:33 PM ·
itweenitweenpath
Itween path problem
Hi guys,
I'm using this code to move a camera around a virtual set:
switch(SceneManager.instance.scene)
{
case 0:
transform.position = new Vector3 (130f,1f,0);
break;
case 1:
Debug.Log("moving to 1");
iTween.MoveTo(this.gameObject, iTween.Hash("path",iTweenPath.GetPath("Scene1"),"time",5));
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
}
But it doesn't work. If I put the code in start function, it works very well but not in update. I'm using Itween visual editor. Any guess?
Comment
Hi! Where exactly are you calling this function? If you are calling it in Update, what prevents it from running on every single frame in Update?
If it is running on every single frame in Update, you will continously try to start the iTween. Not what you wanted I guess.
Your answer
Follow this Question
Related Questions
iTween.PutOnPath similar function for LeanTween or DoTween 1 Answer
How to animate a moving platform GameObject? 2 Answers
iTween MoveTo "Convoy" 0 Answers
iTweenPath Issues in windows? 1 Answer
iTween 2D Path rotation 1 Answer