Search Unity

Help with Movement + Animation using AStar

Discussion in '2D' started by vitorcabral, Aug 19, 2019.

  1. vitorcabral

    vitorcabral

    Joined:
    Aug 12, 2019
    Posts:
    1
    Hi everyone!

    I'm starting learning Unity and C #, I've read many topics and seein a lot videos but i can't find the answer. Maybe I dont know how to search those things.
    My project is for Android.
    All I've done so far was this:



    (Yes, I'm using Pokémon sprites to make the learning more comfortable for me :))

    Now the problem is:

    When I touch somewhere on the screen, AStar finds the nearest path to its target, so far so good.
    But, why does the character swing from side to side? A grid based movement would be perfect.


    And the Animation, I tought I could do it getting the next Waypoint Path and then animate according to it, but I couldn't do it by myself. (I've learned how to do the Animation with Brackeys, but he uses the Arrow keys and not a pathfinder)
     
    Last edited: Aug 19, 2019