Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Prime31 GoKit Tween Library Live

Discussion in 'iOS and tvOS' started by prime31, Apr 26, 2012.

  1. mu-kow

    mu-kow

    Joined:
    May 15, 2012
    Posts:
    106
    @prime31

    A suggestion / idea for the paths:

    the ability to scale the size path in the editor and/or the ability to scale the size of the path when it is called from code.

    That would make the created paths more alot more reusable and would save alot of time.
     
  2. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    So I have tried to make a trigger, which if other.tag == player, other.transform, moves along path. But I am getting a couple of errors. Any help is appreciated.

    Thanks.



    Code (csharp):
    1.  
    2. var path : GoSpline;
    3.  
    4. function Start ()
    5. {
    6.     path = GoSpline(Application.dataPath + "/StreamingAssets/route1a");
    7. }
    8.  
    9. function OnTriggerEnter(other : Collider)
    10. {
    11.     if(other.tag == "Player")
    12.     {  
    13.         var config = new TweenConfig().positionPath(path, true).setIterations(-1);
    14.         Go.to(other.transform, 10f, config);
    15.     }
    16. }
    17.  



    Error1:
    Assets/goKitTrigger.js(6,24): BCE0024: The type 'GoSpline' does not have a visible constructor that matches the argument list '(String)'.
    ???

    Error2:
    Assets/goKitTrigger.js(13,60): BCE0017: The best overload for the method 'TweenConfig.positionPath(GoSpline, boolean, LookAtType, UnityEngine.Transform)' is not compatible with the argument list '(GoSpline, boolean)'.
    ???
     
  3. mu-kow

    mu-kow

    Joined:
    May 15, 2012
    Posts:
    106
    @renman3000 I'm not to up on my JavaScript, but are you maybe missing the keyword "new" before the GoSpline?

    path = new GoSpline(Application.dathaPath + "/StreamingAssets/route1a");
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @renman, UnityScript does not support a lot of standard language features like default parameters. That means you have to fill in every parameter for the positionPath method (there are 4) or just switch over to C# and start using a proper language.
     
  5. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Right.
    So the problem is the language.

    My approach is right tho yah!!!?
     
  6. mu-kow

    mu-kow

    Joined:
    May 15, 2012
    Posts:
    106
    @prime31

    TweenChain().setIterations(-1);

    Will set the iterations of a chain (verified with debug.log)

    But my tween chain runs only once.

    Any idea?

    Edit: I figured it out, I had to set iterations before appending Tweens.
     
    Last edited: Aug 2, 2012
  7. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi Mike,
    I am getting an error for this line...
    Code (csharp):
    1.  
    2. path = GoSpline(Application.dataPath + "/StreamingAssets/route48784");
    3.  
    The error is...
    Assets/pathTestX.cs(11,24): error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected


    So in short, I am unsure how to declare the GoSpline, path.
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @renman, you should really study the demo scenes and docs. They show how to use just about all the features of GoKit. When you instantiate an object you have to use the "new" operator: "new GoSpline" just like in the PathTween demo scene.
     
  9. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Oh. My apologies. I had left that out since I declared the var path as a public, outside of the function. My bad.
    thanks.
     
  10. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    with the following line of code:

    Code (csharp):
    1. Go.to (this, 2f, new TweenConfig ().position (new Vector3 (25, 23, 2)).scale (4));
    I'm getting the following console error from the line of code above:
    tween failed to validate target: PositionTweenProperty
    UnityEngine.Debug:Log(Object)
    Tween:addTweenProperty(AbstractTweenProperty) (at Assets/Plugins/GoKit/Tween.cs:170)
    Tween:.ctor(Object, Single, TweenConfig, Action`1) (at Assets/Plugins/GoKit/Tween.cs:81)
    Go:to(Object, Single, TweenConfig) (at Assets/Plugins/GoKit/Go.cs:225)
    CameraGyroManager:Start() (at Assets/00-scene-content/00-Camera/CameraGyroManager.cs:11


    ****************************************************************************************
    HOWEVER, with the following change, from "this" to "transform", no console error appears"
    Code (csharp):
    1. Go.to (transform, 2f, new TweenConfig ().position (new Vector3 (25, 23, 2)).scale (4));
    ****************************************************************************************

    this presents a troublesome issue for me though. As to include a floatProp tween with a positionProp tween, the gameObject, the "this" must be targeted, and not the "transform". Thus the floatProp wants a GameObject as a tween target, and the positionProp wants a transform. How do you combine a float prop with a positionProp in a single tween if one is needing a GameObject and the other needs a Transform, to function properly?

    to elaborate further on the problem, if I want to tween a floatProp, the following code DOES WORK:
    Code (csharp):
    1. Go.to (this, 1.0f, new TweenConfig ().floatProp ("TweenXrotate_FLOAT", Camera_Flat_FLOAT).setEaseType (EaseType.SineOut).onComplete (theTween => {this.Tweening_BOOL = false; }));
    however, the following code, when switched from a GameObject to a Transform DOESNT WORK:
    Code (csharp):
    1. Go.to (transform, 1.0f, new TweenConfig ().floatProp ("TweenXrotate_FLOAT", Camera_Flat_FLOAT).setEaseType (EaseType.SineOut).onComplete (theTween => {this.Tweening_BOOL = false; }));
    so if this is the case, how to I tween a floatProp and a positionProp TOGETHER if one requires a GameObject and the other a Transform?

    I'd appreciate any assistance. Thanks in advance :)

    EDIT: I'm also experiencing the same issue with the "vector3XProp" GoKit call as well, when paired with a positionProp in a single tween.
     
    Last edited: Aug 7, 2012
  11. mu-kow

    mu-kow

    Joined:
    May 15, 2012
    Posts:
    106
    @3Duaun ,

    I do believe that the 'this' keyword references the script inwhich it's called, not the gameobject it is attached to.

    You may have to set up two separate Tweens because the targets would be different. Though I'm sure prime31 would be better suited to answer that part
     
  12. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    @mu-kow
    I can get this to work with 2 separate tweens, but not with the 2 properties i listed combined in a single tween, which ideally I'd like to use, and not separate tweens, for callback purposes, clean code, and other factors. I hope Prime31 can help :)
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    That all makes sense now. A single Tween can only operate on one target object. The properties you are tweening are actually different classes so they will require a different Tween for each one. You can make a Tween for each one that just add them both to a TweenFlow so that they run simultaneously.
     
  14. 3Duaun

    3Duaun

    Joined:
    Dec 29, 2009
    Posts:
    600
    excellent suggestion as always. TweenFlow time it is :). And GoKit continues to rock on mobile for our development!

    As an aside, a quick question for @Prime31: I've noticed some recent pushes to the GitHub branch, any word on when they'll make it into the Unity Store version. I pull from GitHub for my GoKit anyway, but just wondered. Thank you again for all your assistance, plugins, and tools like GoKit!
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The Asset Store is usually about 1 - 2 weeks behind the Git repo
     
  16. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    @prime31,
    I just went to my GoKit test project and added a GoDummyPath to an object, however there is no way to save the path. Normally, I thought, there was a load and save path option. They are not there.

    Any ideas?
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Watch the video we posted on YouTube or look at the included source code for how to use GoKit
     
  18. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    edit.
    thanks.
     
    Last edited: Aug 9, 2012
  19. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    edit.
    solved.
     
    Last edited: Aug 15, 2012
  20. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi Prime31,
    I am having an issue altering the timeScale of a path. The issue is this. My path script (C#), simply sets up the path, calls the transform to move along it, and sets its time scale. I set the value of the time scale from a separate script (JS) and then SendMessage.alterTimeScale to the C# path script. The value passes, the function is called but I see no visable evidence of a timeScale alteration.



    Can you please look at this and get back to me with a possible solution?

    Code (csharp):
    1.  
    2.     void adjustTimeScale()
    3.     {
    4.         print("adjust timeScale");///function is called
    5.         print("pathTimeScale " + pathTimeScale);//value is set
    6.         config.timeScale = pathTimeScale;//config is a public TweenConfig
    7.         configC.timeScale = pathTimeScale;//configC is a public TweenConfig
    8.     }
    9.  
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    You can't just change a value on a TweenConfig and expect it to modify a running Tween. TweenConfigs are used for configuring a Tween BEFORE it starts. View the source for the AbstractTween class and you will find this: The full source code is included and there is extensive documentation available on GitHub and on our docs page (http://prime31.com/unity/docs/#goKitDoc).
     
  22. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    EDIT:
    For anyone struggling with this.
    The answer is to assign config a var of AbstractTween.
    Thanks.


    I apologize but what I am trying is not working.

    I used this....
    Code (csharp):
    1.  
    2.  
    3.         config.setTimeScale(pathTimeScale);
    4.  
    5.  
     
    Last edited: Aug 18, 2012
  23. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Wait, tho, I need to be able to alter the timeScale midstream. At any point on the path, I need to be able to alter the timeScale.
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The path demo included with GoKit has an example right in it showing how to adjust time scale for a path tween.
     
  25. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    edit
    thanks.
     
    Last edited: Aug 18, 2012
  26. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    edit.
    thanks.
     
    Last edited: Aug 18, 2012
  27. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    edit.
    thanks.
     
    Last edited: Aug 18, 2012
  28. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    edit.
    Solved.
    I was accidentally calling a function before it was prepared.
    Thanks.
     
    Last edited: Aug 20, 2012
  29. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Why is it that some of my tweens are failing upon reloading a scene? I can't understand why there are null references when the same exact scene is being loaded again. I never have any issues the first time around. Getting target validation errors:

    ""target validation failed. destroying the tween to avoid errors""

    Thanks.

    [EDIT] Actually, regardless of that validation error, it fails on a reloaded level specifically if it is tweening a custom property.
     
    Last edited: Aug 21, 2012
  30. geniuscd

    geniuscd

    Joined:
    Aug 10, 2012
    Posts:
    23
    Hello, very nice plugin, it helped me a lot with my animation flow and sequence on my iphone.

    i can tween int, float, vectors, etc... with the Go.to (.... , new TweenConfig(). //here// )
    is there a way to tween strings?
    like this?
    Go.to (.... , new TweenConfig().stringProp )

    appreciate your reply :)
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @genius, there is no built in way to tween a string but you can certainly make your own tween for any type by following the way the other properties work.
     
  32. geniuscd

    geniuscd

    Joined:
    Aug 10, 2012
    Posts:
    23
    sorry for the late reply !
    but thank you al lot for replying back..

    I have another question
    im performing an action when the tween is finished so im using .onComplete inside the tween

    Code (csharp):
    1. Tween blackFadeOut = new Tween(black_img.transform, 1.2f, new TweenConfig()
    2.             .materialColor(new Color(
    3.             black_img.transform.renderer.material.color.r,
    4.             black_img.transform.renderer.material.color.g,
    5.             black_img.transform.renderer.material.color.b,0
    6.             ) )
    7.             );
    8.         Tween blackFadeIn = new Tween(black_img.transform, 1.2f, new TweenConfig()
    9.             .materialColor(new Color(
    10.             black_img.transform.renderer.material.color.r,
    11.             black_img.transform.renderer.material.color.g,
    12.             black_img.transform.renderer.material.color.b,1
    13.             ) )
    14.             .scale(new Vector3(1,1,1) )
    15.             .onComplete( c =>
    16.                         {
    17.                         Debug.Log( "tween done" );
    18.                         Destroy(logo_pref);
    19.                         } )
    20.             );
    21.        
    22.         Tween logo_abu = new Tween(abu_img.transform, 5f, new TweenConfig()
    23.             .scale(new Vector3(0.2182f,1,0.2727f) )
    24.             .setEaseType( EaseType.SineInOut )
    25.             );
    26.         Tween logo_salem = new Tween(salem_img.transform, 5, new TweenConfig()
    27.             .scale(new Vector3(0.126f,1,0.2998f) )
    28.             .setEaseType( EaseType.SineInOut )
    29.             );
    30.         Tween logo_logoimg = new Tween(logo_img.transform, 5, new TweenConfig()
    31.             .scale(new Vector3(0.2455719f,3.967704f,0.1303451f) )
    32.             .setEaseType( EaseType.SineInOut )
    33.             );
    34.         Tween logo_logobg = new Tween(logo_bg.transform, 5, new TweenConfig()
    35.             .setEaseType( EaseType.SineInOut )
    36.             );
    37.        
    38.         Tween logo_ground = new Tween(logo_groundimg.transform, 5, new TweenConfig()
    39.             .setEaseType( EaseType.SineInOut )
    40.             );
    41.        
    42.         logoFlow = new TweenFlow();
    43.         logoFlow.autoRemoveOnComplete = true;
    44.         logoFlow.insert(1, logo_abu)
    45.                 .insert(4, blackFadeIn) // removing the GameObject after finish
    46.                 .insert(1, logo_salem)
    47.                 .insert(1, logo_logoimg)
    48.                 .insert(1, logo_logobg)
    49.                 .insert(1, logo_ground)
    50.                 .insert(1, blackFadeOut);
    51.        
    52.         logoFlow.play();
    53.  
    its working but when it deletes the object i get "target validation failed. destroying the tween to avoid errors" several times and then the message stops.

    I did the same thing in another function, it worked without displaying me the Warning.
    My main target is to delete the GameObject once when the last Tween in logoFlow is finished.!

    I even tried this code
    Code (csharp):
    1. Tween blackFadeIn = new Tween(black_img.transform, 1.2f, new TweenConfig()
    2.             .materialColor(new Color(
    3.             black_img.transform.renderer.material.color.r,
    4.             black_img.transform.renderer.material.color.g,
    5.             black_img.transform.renderer.material.color.b,1
    6.             ) )
    7.             .scale(new Vector3(1,1,1) )
    8.             , c => {
    9.                         Debug.Log( "tween done" );
    10.                         Destroy(logo_pref);
    11.                         }
    12.             );
    any other way to do it?
     
    Last edited: Sep 13, 2012
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @genius, are you using the latest version? There was a bug with the timing of onComplete that was fixed not too long ago which might be causing the warnings.
     
  34. geniuscd

    geniuscd

    Joined:
    Aug 10, 2012
    Posts:
    23
    yes i downloaded the latest version from Github yesterday when I wrote the comment...
    when i add the logoFlow.complete() function before the Destroy(logo_pref) inside the tween, it gives me only 4 warnings and then stops giving me the warnings.

    Im implementing the same animation in another function, its working without getting the errors.

    do you need me to pm you the script ?
     
    Last edited: Sep 14, 2012
  35. geniuscd

    geniuscd

    Joined:
    Aug 10, 2012
    Posts:
    23
    ahh I forget to mention ...
    when writing the the tween that has the .onComplete at the end of the TweenFlow, the .onComplete wont be called! thats why all the script have the last Tween in the middle or the beginning of TweenFlow.

    Code (csharp):
    1. logoFlow.insert(1, logo_abu)
    2.  
    3.                 .insert(4, blackFadeIn) // removing the GameObject after finish ### THIS ONE ####
    4.                 .insert(1, logo_salem)
    5.                 .insert(1, logo_logoimg)
    6.                 .insert(1, logo_logobg)
    7.                 .insert(1, logo_ground)
    8.                 .insert(1, blackFadeOut);
    am I writing these tween in the wrong way or its just that GoKit needs to be updated ?
    thank you for your time, I really appreciate that you are actually supporting this plugin :)
     
  36. geniuscd

    geniuscd

    Joined:
    Aug 10, 2012
    Posts:
    23
    I just re-implemented the
    Code (csharp):
    1. logoFlow.setOnCompleteHandler( c =>
    2.             {
    3.                 Debug.Log( "tween done - now loading the mainMenu" );
    4.                 Destroy(logo_pref);
    5.                 loadingMainMenu();
    6.            
    7.             });
    and removed all the .onComplete

    I think the update fixed the setOnCompleteHandler, thank you
     
    Last edited: Sep 14, 2012
  37. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Am I missing something with the Visual Path Editor? The wiki says to just create an empty game object and then add the GoDummyPath script to it, but when I do that I get a really barebones almost broken looking version of the path editor. There are no handles to grab, no save path options, or any of the options in the tutorial vid/examples. All it has is Name, Color, Nodes, Use Standard Handles, Force Straight Lines, Path Resolution.

    [EDIT] Nevermind! I completely forgot to put the Editor file in my project.. whoops.
     
    Last edited: Sep 18, 2012
  38. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Ok, I'm pretty sure I'm not actually missing anything this time, but are we not supposed to be able to see the path in the Visual Editor unless the "Force Straight" checkbox is ticked? I only see the path while editing when that is enabled. Otherwise, I'll see it once the game object is de-selected. Thanks.

    [EDIT] Ok, I realized that it's just broken in Unity 4. Checked it on Unity 3 and it works just fine. Any idea when this is going to be updated to work with Unity 4? Thanks!
     
    Last edited: Sep 19, 2012
  39. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Mike is away for the next 10+ days and is not in internet reach (on purpose I think), so any fixes for this will have to wait until he is back :(
     
  40. tayl0r

    tayl0r

    Joined:
    Jan 6, 2012
    Posts:
    85
    Has anyone gotten the LoopType.RestartFromBeginning to work with TweenChains? It seems straightforward but I'm having problems with it.

    Code (csharp):
    1.  
    2. // make 2 tweens
    3. Tween scaleUp = new Tween(transform, 1f, new TweenConfig().scale(1f));
    4. Tween scaleDown = new Tween(transform, 1f, new TweenConfig().scale(0f));
    5. // chain them together
    6. TweenChain tweenChain = new TweenChain();
    7. tweenChain.append(scaleUp).append(scaleDown);
    8. tweenChain.setIterations(-1, LoopType.RestartFromBeginning);
    9.  
    I also tried doing this type of thing with OnCompleteHandlers but they seem to break when they are inside of a tweenChain.

    The code example doesn't show this but what I'm actually trying to do is setup an OnCompleteHandler for when the scaleUp tween is done (so I can run other code), then play the scaleDown tween, get a callback when that is done, and then restart the whole thing. This code example here is simplified but I'm still having problems.
     
    Last edited: Sep 26, 2012
  41. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Any word on if this will get updated to work with Unity 4? Particularly the path editor. Thanks.
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @helios, I just checked and didn't see a pull request for any required Unity 4 mods ;)
     
  43. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Wait, are you saying there are no compatibility issues with Unity 4? Sorry, I'm a little confused.
     
  44. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @helios, you tell me. You are the one that posted asking about compatibility issues. We are openly accepting pull requests if there are any issues.
     
  45. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    I'm afraid I have no idea how to submit a pull request. I'm assuming you're talking about through GitHub?
     
  46. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    Can someone explain to me what Prime 31 is talking about? All I'm wondering is if the Visual Path Editor can be fixed to fully work in Unity 4.
     
  47. Theformand

    Theformand

    Joined:
    Jan 2, 2010
    Posts:
    271
    Im trying to make a sort of temple run clone, and stumbled across this tweening library. I wonder if there is any way of switching between different paths created in the visual path editor during runtime? Like left, right etc. I'm afraid I dont fully understand the usage of this plugin. My approach so far has been to go by the wiki "getting started" code.

    However, when I try defining a new GoSpline which contains the second path, and a new TweenConfig to go with it, I get strange behaviour. The code is seen below

    Code (csharp):
    1. private AbstractTween _tween;
    2.     private GoSpline path;
    3.  
    4.     // Use this for initialization
    5.     void Start () {
    6.        
    7.         pathDemo();
    8.    
    9.     }
    10.    
    11.     // Update is called once per frame
    12.     void Update () {
    13.        
    14.         if (Input.GetKeyDown(KeyCode.Space)) {
    15.             _tween.play();
    16.         }
    17.        
    18.         if (Input.GetKeyDown(KeyCode.D)) {
    19.            
    20.             PathRight();
    21.             _tween.play();
    22.            
    23.         }
    24.    
    25.     }
    26.    
    27.     void OnTriggerEnter(Collider col)
    28.        
    29.     {
    30.         Debug.Log("SUCCESS!!");
    31.     }
    32.    
    33.     void PathRight(){
    34.        
    35.          path = new GoSpline("testRoute2",true);
    36.         var config = new TweenConfig()
    37.             .positionPath(path,true,LookAtType.NextPathNode)
    38.             .startPaused();
    39.        
    40.         _tween = Go.to(transform,6f,config);
    41.         _tween.autoRemoveOnComplete = false;
    42.        
    43.     }
    44.    
    45.     void pathDemo(){
    46.        
    47.          path = new GoSpline("testRoute",true);
    48.         var config = new TweenConfig()
    49.             .positionPath(path,true,LookAtType.NextPathNode)
    50.             .startPaused();
    51.        
    52.         _tween = Go.to(transform,6f,config);
    53.         _tween.autoRemoveOnComplete = false;
    54.        
    55.     }
    But perhaps my logic is wrong? Im not meant to create a new GoSpline? And how would "switching" to a nearby path really take place? Would I need to insert a new path node on the path I wish to go to, at run time? Or would I need to switch to the desired path, at the current tweening time?

    Any pointers in the right direction for achieving this would be greatly appreciated. Thanks!
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @theform, there are many ways to do what you are trying to do. I personally would just make the path nodes dynamically at runtime for that case (or just have the left/right path nodes hardcoded). You are adding a tween and setting it to not be automatically removed on completion and then never stopping it when adding a new one. You may want to consider always stopping the tween that is running when adding a new one to ensure they don't overwrite each other.
     
  49. Theformand

    Theformand

    Joined:
    Jan 2, 2010
    Posts:
    271
    Ahh alright, so I should actually be sure to have 3 tweens declared (if I want 3 paths), and making sure to stop the ones that arent running? In the case of dynamically make the path nodes, upon pressing left or right, how would I edit a path?(adding a node) I thought they were serialized and saved on disk?
     
  50. bitever

    bitever

    Joined:
    Mar 4, 2012
    Posts:
    17
    Hi prime31, I'm making a 2D game. I wonder what I have to do to be able restrict the rotation, and that the face of the plane of the sprite is facing ever-Z but following the path of the path.

    When I use LookAtType.NextPathNode, the sprite is rotates and not oriented orthographic camera.

    Thanks for this Asset, I have several yours like iAd and Game Center and all work great.