1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Aligning pathfinding to the center of tiles?

Discussion in 'Programming/Internet' started by user4985, Aug 2, 2020.

  1. user4985

    user4985 Guest

    I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain.

    [​IMG]

    [​IMG]

    Since the tiles are simply made out of 32x32 sprites, I set the tilesize of the pathfinder to 0.32 to produce the above grid.

    However when tested out with a unit, the unit often does not align itself to the center of the sprite as shown in the image below. [​IMG]

    I am pretty new to unity and would appreciate if someone could input on how I can fix this or advise on an alternate method to allow this "tile to tile" path finding to work.

    Login To add answer/comment
     

Share This Page