A* Pathfinding Project

New user need advice


hello , i need let Tank move like Red Alter 2 , eight direct
and when rotate 180 , it will stay until rotate finish.
Should I use AIPATH or write Move Script by self,
I not sure does AIPATH enough
and should all other setting keep default ?
need advice



I would recommend writing a custom movement script for that.


I tried to read the source code, but I was frustrated and I couldn’t understand it at all. What should I do? If I want to understand how AIPATH works, I have to figure out how AStarPATH works first. But it’s impossible because it’s too complicated. What’s the right way to get started?



There is a tutorial for writing a simple movement script here: https://arongranberg.com/astar/docs/custom_movement_script.html. That should be a good starting point.
The AIPath script is a lot more complicated because it has to support a ton of different game types and behaviors.


Thank you ,I just found out that you are the author of A Star .A Star is great.
I still have two questions .
How to add/delete obstacle dynamicly in Grid Graph ?
In RVO_2D ExampleScene , a group of agents go to the same destination, how can they not push each other When they reach the destination ?


Hey, for dynamic obstacles you can use the dynamic obstacle script, more information here: https://arongranberg.com/astar/docs/old/class_pathfinding_1_1_dynamic_grid_obstacle.php

To prevent RVO agents from traveling to the exact same destination you would have to manually implement a formation system that would give them individual destinations. There is an RTS demo available that has some of these components build in.