Now we have an understanding of the basic concept of creating the enemy AI, but our AI script still needs a lot of improvement to make it smarter. Why don't we do something to spice it up?
Physics.RayCastand rotate the enemy rotate when it hits the wall
AIController, such as the
getPlayerRange, to make the enemy react to the player faster
Waypointsgame object to make sure our enemy has more choice to walk