I encountered the following problems in my game:
There is an obstacle in the scene, and the obstacle can be moved. I wanted the player character to ignore and go through this obstacle, but the enemy character would see it as a normal obstacle and couldn’t go through it.
I tried using “GraphUpdateScene”, which can do the above, but since the obstacles are dynamic, I tried using “astarpath. scan ()” to refresh the grid after the obstacles have moved, but there is a lag in refreshing, which makes the game experience worse, there are better ways to do it This function?
I’m using the “Laygred Grikl Graph”, version 4.2.15
Hi
The easiest solution is to use multiple graphs with the same approach as is taken in this tutorial: Multiple agent types - A* Pathfinding Project
You can also use tags, but that is a bit more work. See Working with tags - A* Pathfinding Project