- Home /
Help with I tween error!
Hey, my script says that best overload for the method 'ITween.moveTo(UnityEngine.GameObject,System.Collections.Hashtable)' is not compatible with the arguement list '(UnityEngine.Transform,Boo.Lang.Hash)'.
My script is:
It is supposed to loop my i tween
//object to be tweened var tweenObject : Transform;
function Start () { //begins loop Tweens(); }
function Tweens () { // whatever happens iTween.moveTo( tweenObject, { "x" : 10 , "y" : 10 , "z" : 10 , "time" : 2 , "onComplete" : "looptween" }); }
function looptween () { //repeats loop Tweens(); }
Answer by pixelplacement · Jul 30, 2010 at 06:29 PM
iTween needs a GameObject not a Transform ;)
Make tweenObject a GameObject and you should be good!
The guy that actually made ITween doesn't get an upvote :P
Answer by Mike 3 · Jun 28, 2010 at 10:40 AM
Try using tweenObject.transform instead of just tweenObject as the first parameter in the function. I'm guessing then it'll be able to implicitly pass a boo hash for the second parameter without any problem
Your answer
Follow this Question
Related Questions
What does this mean ? 1 Answer
How to animate a moving platform GameObject? 2 Answers
Unknown Identifer 'iTween' 1 Answer
Strange physics, rigidbody, iTween activity 1 Answer
iTween: Cannot cast from source type to destination type. 1 Answer