Search Unity

Making a sprite follow along a path which is visible in the Editor?

Discussion in '2D' started by CarterG81, Jul 25, 2014.

  1. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I have not yet touched on Unity's NavMesh or Pathfinding, so forgive me if this question is newbie/basic.
    I am a bit tired in searching for all the different ways to handle my problem, and have used a few assets already to try to solve the problem, but had some issues. The problem isn't difficult, but there's an endless number of ways to solve it.

    I am basically trying to make a sort of "Cut Scene" where a scene is loaded, and upon loading the scene, sprites animate and walk around. That's just about it. The harder part is that I need to setup these scenes quickly (see: Efficiently) by saving time. It doesn't matter if they are on a predetermined path or have AI logic, but I know the former will be easier to script so lets just go with that.

    I do not wish to go with a tile based system. Do you recommend any assets for this that I could buy to save the time or help create scenes with many characters moving around predetermined paths, changing animations, pausing movement, etc?

    I was thinking of simply having some line paths which were visible in the editor, which I could create super fast (Walk left from Point A to Point B, then walk up to Point C - two lines). Once I hit "Play", the sprite walks along the path, and wallah!

    Sometimes I will need these paths to be paused, as I said these are sort of cutscenes which can range from characters just walking around, to characters walking along and then changing animations, pausiing before moving onwards, etc.

    I currently use DialogueSystem, and tried uSequencer (which didn't work and was confusing as hell to understand). I figured simple scripting would suffice, but I am open to suggestions as to the best way to quickly create scenes like this, quickly create the paths/pausing/animation changes/timing, etc.

    I have to create A LOT of these scenes, which are all brief but can sometimes contain tons of character sprites doing stuff.
     
  2. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    I did a bit of research and the proper term is Waypoint, since the path is known.
     
  3. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    iTween will show and tween along a path. I like Simple Waypoint Manager for these type of things.
     
    CarterG81 likes this.
  4. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,773
    Thank you :)
     
  5. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683