10
Creating an AI to Attack the Player
In an RTS game, the battle is one of the most important and challenging features of the game, and it could be the one thing that will make players love or hate the game. Combat must be a fun challenge for the player, and all the actions and decisions must be made by the player during the battle.
In this chapter, we are going to expand the components we have created so far for both units and enemies, adding more physics settings and a new collision component that will work with the NavMesh system to create a solid combat experience for the player. We will also refactor some duplicated code to make it easier for units and enemies to interact with all the new and existing systems.
By the end of this chapter, ...
Get Creating an RTS Game in Unity 2023 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.