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.CapsuleCast
or Physics.RayCast
and rotate the enemy rotate when it hits the wallAIController
, such as the shotRange
or getPlayerRange
, to make the enemy react to the player fasterWaypoints
game object to make sure our enemy has more choice to walkHitPointUI
game object to be able to track the hit points for each enemy)AIController
code for the enemy to avoid the rocket and maybe make the rocket follow the player's movement18.219.249.210