Add Custom Local Avoidance To AIPath

  • A* version: 5.4.6
  • Unity version: 6.3

Hello! I have been playing with A* PathFinding Project Pro. It solved a lot of the porblems of my game and is really easy to use, so, thank you for that.

I am building a 3D AutoBattler. For now, I am just using a Recast Graph, since feel it will give more freedom to add knockback and kiting, but I will still test the use of Grids. However, the main problem I have now is how units avoid other units (friendly or not) to reach their target. Circle enemies have been a problem, and sometimes the local avoidance (LO) fails. Hence, I have a custom local avoidance that I want to test and merge into the project’s Pathfinding. The custom LO outputs a direction vector for the unit to move. The best way to apply this to the AIPath component will be to update the velocity in every specific frame? Or, probably, there is a better way?
Thank you for your attention!

Unless you have a reason to not do this, adding to the velocity works perfectly fine IMO. I’ve done this with “wind boxes” and had no issue.

Ok! Thank you, I am doing an auto battler, and I am having some problems with the movement state of the units, since when 2 units from the opposite team try to deviate in the same size, they take a lot of time to solve the traffic, and when moving a side near the arena limits, they generally get stuck.

I hope the custom systems solve this. Thank you!

1 Like

If it doesn’t feel free to ask for more help :slight_smile: