- Home /
iTween ease type help
So i'm using iTween to move an object. My current code is
iTween.MoveTo(gameObject,Vector2(-1.2,0),1.5);
I've been having trouble adding an ease type to it. The one I want to use is easeInOutQuart. How would the script look if I was to add this to it.
Answer by byurocks23 · Feb 21, 2014 at 06:09 AM
I've done some more research and was able to find my solution, i am using
iTween.MoveTo(gameObject,{"x": -1.2, "easetype": "easeinoutQuart","time": 1.5});
Answer by PuneetK · Feb 21, 2014 at 05:29 AM
iTween.MoveTo(gameObject, iTween.Hash("position", Vector3(-1,2,gameObject.transform.position.z), "time",1.5, "easetype", "easeinoutquart"));
This should work. If you are using C#, add the 'new' parameter before Vector3.
You can also add almost any iTween parameter using this method
Your answer
Follow this Question
Related Questions
Using Itween with Unity 2D, sprite flips over while using orienttopath 1 Answer
OnCollisionEnter2D/OnCollisionStay2D only detecting collision with the ground 1 Answer
Collider just for Tag (2D) (C#) 1 Answer
Path Controlled Character and Working With Physics on iTween 1 Answer
iTween 2D Path rotation 1 Answer