Monday, 3 April 2017

More A* Adjustments

For this weeks work I looked at making some small adjustments to my path-finding algorithm. The things I looked at changing were adding the ability for me to check how long the AI path is, fixing node generation around raised platforms, fixing raycast height for AI sight and looking into the AI running awkwardly between nodes when moving.

 I started by adding the ability to check the path distance. This allows me to use my algorithm to calculate the sound for the AI as previously I was still using Unity's navMesh to calculate this. After changing this I then fixed the bug where some nodes generate strangely around raised platforms. This was causing a few problems where the AI would try to take a path that it couldn't reach so would get stuck. Next I looked at changing the movement between nodes. I started by looking at changing how the AI rotates when moving. Doing this helped when moving where there were no obstacles around the AI however when needing to path up stairs or around and object the AI would get stuck then glitch through walls. I changed this back to the previous system and will look at fixing this again later. Finally I looked at fixing the height the AI sight raycast was being shot from. Previously it was from the AIs feet and when moving it up to eye level I either got errors or the raycast wouldn't hit the player. After a little bit of bug testing I noticed that the raycast was being shot at a slight angle upwards causing it to go over the player. This has now been fixed so the AI will see from eye level.

Next week I will be bug testing all components of the AI and will be testing the AI out in different situations to see how it can handle them. Some example of things I will be trying are adding multiple AI to the scene and more advanced scene layouts with multiple different heights and complex mazes.

No comments:

Post a Comment