Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

iTween animation system

Discussion in 'Assets and Asset Store' started by pixelplacement1, Apr 13, 2010.

  1. G.G.

    G.G.

    Joined:
    Feb 28, 2013
    Posts:
    5
    lol. I know also gokit and path.
    They dont have path visualizer
    ^,^'''
     
  2. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Last edited: Mar 11, 2013
  3. G.G.

    G.G.

    Joined:
    Feb 28, 2013
    Posts:
    5
    I have try Hotween, good and fast, but dont have a path tool.
    Path visualizer is a powerfull tool for every tween kit (hotween, itween, lean tween, etc...).
    Particularly when a programmer need to create more different paths.

    It's the same efficiency difference between to create a street in CAD to export in Unity and create the street into unity with specific tools.

    ^_^
     
  4. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    968
    I'm trying to animate a stream of gameObjects (arrows actually) along a path to indicate flow direction. I started with the 'pathexample' project. Several questions...

    I don't have control of the orientation of the object i'm trying to animate. I modeled the arrow in Max and have experimented with many ways of exporting and manipulation the transform. No matter what, the arrow always points up. I have 'orienttopath' set to true, so it's always perpendicular to the path, but I cannot get it to point down the path. Weird.

    Since I am animating many arrows along the path at the same time, I had a prefab with the example script attached, and a manager that Instantiates them at regular intervals. I am passing it an array of Transforms to satisfy the 'path' argument. It works, but afterward I get the error at 'iTween.DrawPath(path);' ...

    NullReferenceException: Object reference not set to an instance of an object
    iTween.DrawPath (UnityEngine.Transform[] path) (at Assets/iTween/Plugins/iTween.cs:5822)
    SetPath.OnDrawGizmos () (at Assets/_Scripts/SetPath.cs:16)
    UnityEditor.DockArea:OnGUI()

    My code is...

    Code (csharp):
    1.     Transform[] path;
    2.  
    3.     void Awake()
    4.     {
    5.         GameObject points = GameObject.Find("Path_01");
    6.         path = points.GetComponentsInChildren<Transform>();
    7.     }
    8.  
    9.     void Start()
    10.     {
    11.         tween();
    12.     }
    13.  
    14.     void OnDrawGizmos()
    15.     {
    16.         iTween.DrawPath(path);
    17.     }
    18.    
    19.     void tween()
    20.     {
    21.         iTween.MoveTo(gameObject,iTween.Hash("path",path,"time",7,"orienttopath",true,"looktime",.6,"easetype","easeInOutSine","oncomplete","complete"));  
    22.     }
    is 'OnDrawGizmos()' called before Awake()? Thanks.
     
  5. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    968
    OK, i figured all of that out.

    I'm using the iTweenPath script. How can I fine tune the path? Can I add handles at the nodes? Please advise, thanks.
     
  6. Jool

    Jool

    Joined:
    Jan 17, 2014
    Posts:
    6
    Hello,

    I am using Unity2d and I have a little problem with iTween.

    I want to animate a gameobject back and forth between 2 points, with a linear speed.
    For that I use 2 paths, each has 2 nodes. The begin node of the first path is the same as the end node of the second path and vice versa.
    Once the gameobject has gone through path1 it will start to go through path2, and then go through path1 again, etc...

    The problem I have is that even when I set the game object position to be the same as the first point of the 1st path the gameobject does not follow the path directly but there is some kind of interpolation between his position and the first node. It kind of makes a little detour before reaching the first node of the path. Once it reaches this node it goes along the path very quickly, as if it wanted to catch up the time lost making this detour.

    Once it has reached the end of the first path everything starts to work as it should and the gameobject starts its back and forth between the 2 points at constant speed.

    Is there a way to fix this little annoyance?

    Thanks a lot.
     
  7. droido

    droido

    Joined:
    Jan 27, 2014
    Posts:
    9
    Hello.
    You probably know Itween.FadeTo changes colors for every child in targeted gameobject.
    Is it possible to ignore itween in child, unless I say Fade to this exact gameobject?

    There's a convenient hierarchy and better not to separate everything just to be able to tween independently.
    thanks for any help.
     
    Last edited: Jul 1, 2014
  8. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    What's happened to the support of this product? One bug has been outstanding for nearly 4 years now.

    Bob?
     
  9. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    349
    I'm trying to create any kind of a tween using iTween, however they all fail with the following error:

    NullReferenceException: Object reference not set to an instance of an object
    iTween.RetrieveArgs () (at Assets/Plugins/Pixelplacement/iTween/iTween.cs:6811)

    The line of code there is:
    id=(string)tweenArguments["id"];

    Any thoughts?
     
  10. Thaniels

    Thaniels

    Joined:
    Mar 31, 2014
    Posts:
    22
    Dear Pixelplacement,

    I'm currently finishing up my graduation project and I'm trying to make my model turn along the path I have set up with my Itween editor, you know make him take all the corners and turns the path makes. I have tried and tried, and yet I can't seem to get it to work. Is there a way to do with, because I would really like to make the animation in my game look a bit more realistic :)

    Hope you can help

    Best

    Nathan.
     
  11. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    710
    I want to play scale and rotation animation using iTween. I used Google for this purpose but didn't find anything useful.

    At present, I can able to play single animation using iTween but when I attach other animation, it didn't play it. I don't know how to do this?
     
  12. wbb21230

    wbb21230

    Joined:
    Nov 27, 2017
    Posts:
    1
    //Destroy "iTween" component before copy↓↓↓
    Destroy(srcObj.GetComponent<iTween>());
    GameObject newObj = (GameObject)MonoBehaviour.Instantiate(srcObj);
     
    Last edited: Jul 15, 2018
  13. Ginxx009

    Ginxx009

    Joined:
    Sep 11, 2016
    Posts:
    88
    Hi sir good day I did this code for my notice on the top of my game

    https://imgur.com/a/k8F4OXU

    Now I use this code

    Code (CSharp):
    1. lbl_notice.text = LocalizationManager.NOTICE;
    2.         iTween.MoveBy(gameObject, iTween.Hash("x", -3.5f, "easeType", iTween.EaseType.linear, "loopType", iTween.LoopType.none, "delay", 2f, "onupdatetarget", gameObject, "onupdate", "OnUpdateFlowNotice",
    3.                                 "oncompletetarget", gameObject, "oncomplete", "OnCompleteFlowNotice"));
    But the problem is that

    https://imgur.com/a/0Da9Mve

    I want to stay put the text for like 2 seconds then go back to its original position again then do the tweening again.