Search Unity

Play Walk Animation until the GameObject reaches a specific point

Discussion in 'Animation' started by Arionas_MC, Sep 9, 2019.

  1. Arionas_MC


    Sep 2, 2019
    (2d Project)
    Hello everyone,
    I have an Animator with 3 Animation States (below image):

    The problem is that I have a trigger that I activate when I want to go from the idle state to the walk state, therefore it covers a small distance "walking" and then it hovers over the area doing no animation, but I want my object to do the walk animation until it reaches a specific point(Vector3). The object moves with the Vector3.MoveTowards function.
    Thanks in advance :)