Search Unity

Objects to join their respective lanes, after spawning and start moving forward.

Discussion in 'Scripting' started by Ki4Chan, Oct 29, 2017.

  1. Ki4Chan

    Ki4Chan

    Joined:
    Jul 2, 2017
    Posts:
    24
    I want objects to move like this(check image) every time they spawn.

    1. their spawn place.
    2. Reaches to their respective lane(in one or two seconds).
    3. After reaching to their respective lanes, they should start moving forward.

    The only method I can think of is an animation on each object.
    Is there any other proper method to do this?
     

    Attached Files:

  2. TaleOf4Gamers

    TaleOf4Gamers

    Joined:
    Nov 15, 2013
    Posts:
    825
    Is NavMesh not an option? Just create 3 empties, one at the start of each lane and assign 1/3 of the AI to the left, 1/3 to the mid and 1/3 to the right. Upon reaching the destination just tell them to walk forward (However, you plan on doing that). This way they would have pathfinding. Animation just wouldnt be flexible enough IMHO.