A* Pathfinding: Debugging Special Cases
December 19, 2019 A* Pathfinding Debugging Special Cases ISSUES Getting an Index Out of Bounds Error in EnemyBasicMovement Script Error happening on this line: Vector3 direction = (path.lookPoints[0] - transform.position).normalized; Suggests that the very first point in a path does not exist, so somehow empty paths are being passed through the system. Test 1: Increase A* Grid Size to Cover Entire Play Area and Spawn Points Some of the spawn points are a bit off of the normal play area, so I made sure to cover anywhere the units could possibly exist with the A* grid so they always had a node to latch onto (even though I believe the clamping should cover this error). This did not end up being the issue as the error persisted. Test 2: Increase Size of Walkable Plane Over Entire Play Area Similar to the logic of Test 1, I just wanted to make sure the nodes were not not being created because the units were missing some usual piece of information they would have to m...