AI Pathfinding Cont.
Since last week, I have been working on the ai pathfinding part of our project, but I do have some problems that I am facing which is the NavMesh is not updating real-time while the game is running. The result would be our AI character would be stuck on the route that it calculated at the being of the game.
I researched some of the ways that could resolve this problem for this week. At first, I found out that there was a plugin called Environment Query System which allows our AI to react to the surrounding environment. At the same time, it could build into our AI behavior tree for our AI to run it. But this plug-in was very limited when we only used blueprints to implement. So, I didn't make much progress in that way.
Link on learning EQS: https://www.youtube.com/watch?v=dLVWnNEMlmQ&list=PLNBX4kIrA68lJZIdFOpWqqY7d4ehjVKMx&index=7
After spending much time on try to learn how to use EQS. I found that there was an easy-to-solve solution which is a NavMesh setting in Unreal. That is changing the NavMesh calculation (Runtime Generation) from static to dynamic. That was very hilarious that only one button could resolve the problem, but I was trying to find out for like few days.
Demo
Furthermore Test on Pathfinding
In the last class, we mentioned that in our game, we will place some obstacles in the maze to slow down the aliens from invading the spaceship. So, I also did some similar tests on my existing AI. That is, after all the roads that can be walked are blocked, how will the AI choose.
From my last behavior tree, I slightly modified some settings of it. When my AI has no path to go, it will go to the place closest to the target location, wait for 3 seconds, and then recalculate whether there is a new path to go. If not, it will continue to wait until there is one.
In the test, I generated a wall that will automatically destroy after 3 seconds, to test my AI's reaction.
Demo
Comments
Post a Comment